Megapixels is only a measurement of size, not quality. Just as a 35mm negative in a quality film camera (i.e. Nikon) can produce a much higher quality picture when using a high quality lens and high quality film when compared to a cheap box camera with cheap, but larger, 2 1/4 film and a crappy lens. Even with the same film the the 35mmm will be better.
However, if you take a high quality film camera using 2 1/4 film (i.e Hasselblad) with a high quality lens and film you will get a high quality that can be printed to a much larger size than the 35mm negative.
So a higher number of megapixels in a camera that is equal quality (lens, electronics, etc.) with a camera of lesser magapixels, has the advantage of increasing the possible size of the print and maintaining the quality in the larger print.
More megapixels = not better, just bigger.