(Actually less, if you factor in the constrains of the specific key the tune is in, but let's be maximalist and get an upper bound).
Now, a melody also comes with a rhythm / syncopation pattern, but let's just count simple 8th notes in our test case (one can consider a whole note as 8 consecutive "legato" 8th notes of the same pitch for our purposes).
How many bars? 8 bars might be a good starting point (many pop verses are that, eg: http://en.wikipedia.org/wiki/Thirty-two-bar_form ).
So, that would gives us: 8 bars * 8 eights with 24 notes for each eight, which gives us roughly: (8*8)^24 different melodies.
Which is like, a lot, man (think 40-figure range).
In practice it could be from much less (considering key constraints which limits the notes you could use) to much more (considering higher than 2 octaves Zappa or avant-guard like melodies, durations shorter than 8ths, etc).
Another major factor is the "melodic quality" of the melody, which is kinda subjective. 8 bars of 8th C notes, for example, wouldn't be that interesting, and many people would not even consider them a melody.
Still that would leave billions of quality melodies in the millions of trillions of possible melodies.