What you need to know, from the kind of user you are to current technologies.
How many megapixels do I need?
As much as we'd like to give a one-word answer, this is one of the trickiest questions in digital photography, so we'll provide a short answer and a long answer.
Response:
The short answer |
The long answer
The short answer
For any images you plan to print or retouch, we recommend you stick to 7-megapixel resolution and higher; Web- and e-mail-only photos should be fine at resolutions below that.
The long answer
It depends upon what you're doing with the picture and how you're doing it.
Hint: If you're going to display or print pictures at smaller-than-actual-pixel size, resolution doesn't matter much--opt for the camera with the best color.
The images below were shot with a 4-megapixel and a 6-megapixel camera, respectively, and scaled down to smaller-than-actual size. Aside from slight color differences, they should look pretty similar.

4-megapixel |

6-megapixel |
Let's say you want to blow up a detail shot or print a picture; that's where extra resolution comes in handy, for both printing and Web display. The 4-megapixel shot (left) is a bit blurry, but the 5-megapixel (middle) and 6-megapixel (right) shots come pretty close to each other. Which could you live with?

4-megapixel |

5-megapixel |

6-megapixel |
Now, suppose you want to crop in tightly on that "20." That's where higher resolution comes in handy. Once again, here are the 5- and 6-megapixel shots, cropped so that the "20" fills the same size space, plus a 10-megapixel version.

5-megapixel |

6-megapixel |

10-megapixel |
The 5-megapixel shot (left) loses some cohesion, but the 6-megapixel (middle) and 10-megapixel (right) shots are pretty comparable to one another. The key is knowing how close you're going to want to get.
More digital camera resources from CNET