Given all of these parameters, there were still many thousands of combinations. Applying the Markov chain limited that a lot, but that was only to make it sound like Chopin (which it did, a little). However, most of the thousands of combinations sound like crap, which is not an insignificant point. If you're willing to call some random sequence of notes a melody, then there are an infinite number
(http://sunsite.univie.ac.at/Mozart/dice/)
(http://en.wikipedia.org/wiki/Musikalisches_W%C3%BCrfelspiel)
Your question is tricky because you haven't mentioned anything about time signatures or length of time for each note, nor how many octaves you want to work with.
A regular piano has 88 keys.
So, 88 notes with a 32 note length sequence (with fixed times etc) means 88 ^ 32 or 1.6728057e+62.
You said 88 keys = 88 notes but they are just same basic notes,one of those 7 +sharp/flat.
(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.