Its unfortunate that current popular opinion about the strength of camera quality revolves around the abundance of megapixels. Well, its not the consumer's fault. That was how it was marketed. It was an easy number for comparison, and something that could be bested.

Contrary to common opinion, number of megapixels hardly matter unless one wants to make large prints off their digital pictures. The greater problem is when a manufacturer tries to squeeze in more pixels in same real estate. What I mean is that, the sensor size hardly changes among cameras of the same class. By increasing the pixel count, the pixel size goes down reducing the amount of light captured by each. Imagine pixels as buckets that should be filled with water (light). When the size goes down, they can hold less water (light) reducing the quality of the final image.

There are other ways to ensure more water in these buckets, though. Here comes exposure modification - like increasing the aperture and exposure time.