hey bill since if you're using equal temperament there are only 12 notes and if further you are sticking to a single key there are only 7 notes... and then you're limited to the combinations of those notes you think actually sound good- how on earth is it possible to create unique melodies. isn't it almost certain that hundreds of other people have come up with the exact same thing.
it depends how long it is. once you get to about 10 notes or more, the possibilities go well into the multi billions, and that's only including the possibilities that are truly great and meaningful