In an article by David Pogue in the New York Times busts the myth that the more pixels (or megapixels) a digital camera has, the better the output.
Overall, I agree with the article, the number of megapixels that a camera has more to do with marketing than anything else. It's very hard, if not impossible, the tell the difference between a photo taken on a camera with, say, 6 megapixels and one taken on a camera with12 megapixels. If you buy based solely on the megapixel prowess of a camera, you'll be making an ill-informed purchase.
However, I do need to pull up Pogue on a few issues. First off, scaling a photo in Photoshop is not the same as taking the photo using different cameras. The same goes for taking different images with the same camera. These methods don't test the camera and will yield nothing but bogus data. Test images have to be taken using a camera and the output has to be unedited.
Secondly, not all cameras are created equally. The fact is that the quality of the CCD (the sensor that catches the image from the lens) varies wildly from one camera to another. I've seen output from a camera running 6 megapixels that beats a 12 megapixel camera because the 12 megapixel camera has a noisy CCD or tended to exaggerate or reduce on certain colors. Two different models of camera from the same manufacturer can output very different results. The only way to be sure it to test. You can either do this yourself if you get the chance of visit a site such as Digital Photography Review and check out the extensive real-world testing that this site carries out (this site is a firm favorite of mine and I won't buy a digital camera without checking out the review on this site first).
Also, it's important when buying a digital camera (or any product for that matter) to look at the product as a whole and not focus on one aspect and ignore the rest. A digital camera is much more than the size of the CCD - take into consideration the quality of the lens, the type of memory it uses, the speed that it writes files, the flash, the controls and anything else that seems important.
Finally, what people do with their photos has changed over the years as film has given way to digital. People are no longer restricted to looking at their photographic output on paper, they can view the image on the PC, make them into a DVD and see them on the TV, or display them on a digital photo frame. On a PC they can zoom in on the image, edit the image and crop to suit. It's under circumstances such as these that having a higher resolution image to begin with pays off.
Doing your research before you whip out your wallet pays off - ignore the marketing hyperbole and go with independent facts. Relying on a single number or specification isn't the way to make an informed purchase.