Megapixels are the most overrated part to consider while you buy a camera. Marketers have fooled people into believing that more megapixels mean better picture quality. If you camera has more megapixels than what its image sensor can handle, you will face noise issues and your images will not be crisp. Another problem with higher megapixels is the high amount of disk space it takes.
Most contemporary cameras feature 10 megapixels which is more than sufficient unless you are a professional who can spot the tiniest details. However, once you go above 10 megapixels, it is hard to spot the difference. Megapixels do not define the camera’s quality and overall value. For usual poster size prints, 8 to 10 megapixels are more than enough. You should go for more megapixels if you want larger photos than that.
Overall, for image quality and rich colours, the camera’s sensor is a lot more important as compared to megapixels. A cell phone might have more megapixels than a DSLR, but a DSLR camera will still provide better results with its bigger and better sensor. Always check the sensor before buying a camera.