In the Chicago Cubs organization, starting pitchers threw about 40 warmup pitches before a game. However, Dontrelle Willis (now with the Marlins) and Carmen Pignatiello, both lefties, tended to throw 50 to 55 pitches. There was no hard-and-fast rule. The key is getting to the point where you're sweating a bit and feel comfortable with your mix.
Remember, you get 8 warmup pitches on the game mound.