Digital camera and cell phone manufacturers have a selling strategy (I donno why) saying the more megapixels, the better the camera. But do you really need all those millions of pixels per inch? Nevertheless, the majority of people who buy their cameras based on megapixels end up cropping their photos or resizing them because the file was too large to upload online.
Few years back, the megapixel rating of cameras was actually quite important because most cameras were at the lower end 1, 1.2, 3 megapixels, etc. Today, however, all new cameras come with at least 5 megapixels.
A pixel is the smallest single component of a digital image represented by digital values, or pixels in a digital camera (sensor element). The term "pixels" is used as a measure of resolution, such as: 2400 pixels per inch or 640 pixels per line.
Dots per inch (dpi) and pixels per inch (ppi) are terms sometimes used interchangeably especially for printers, where dpi is a measure of the printer's density of dot. For example, a high-quality image may be printed with 600 ppi on a 1200 dpi inkjet printer.
One of the main questions to ask when buying a new camera is ‘Will you be printing large formats’? If so – how large will you be going with them? If you're only printing images at a normal size (called "10 × 15 cm" worldwide) then anything over 4 or so megapixels will be fine. If you're going to start enlarging your images you might want to opt for more megapixels. Anything beyond your need is not needed ! If you're only sharing online (i.e. you are not printing), on the contrary, the more megapixels the more disadvantage because photos are so large that they take more space on memory cards and hard disks.
So how many megapixels do you really need? Well, for most purposes 3 megapixels is plenty, but you might want to shoot at around 8 megapixels for more details should you wish to crop and maintain quality. 8 megapixels is more than enough for big prints and HD monitors.
One should not forget that image quality is also defined by the camera sensor size, the quality of the lens glass, the metering and exposure systems, the highest ISO possible without grain, etc.
So, unless you are a professional photographer with a state of the art DSLR and intend to shoot photos and want to produce huge poster prints (those you see covering 10 storey buildings), then it is a good idea to have those extra megapixels.