Until recently the quality of digital cameras was measured by how many pixels they boasted. Now we have cameras that can produce tens of millions and it has ceased to be the only test of quality. In the real world the number of pixels you need depends on how big you want to print your pictures. If you mainly want postcard size or A5 then I would consider 6 million pixels to be perfectly adequate. Even at A4 size I would be hard pushed to tell the difference between my 6.5 million pixel camera and my 10 million pixel camera. Don't forget though that your cropping in the camera may not always be perfect so you may be enlarging only a portion of the image and so only using a portion of the available pixels.
Although an adequate number of pixels is important, the quality of your picture will be greatly affected by the quality of the lens. When Canon updated the EOS 350D (digital rebel) with 8 million pixels to the EOS 400D with 10 million pixels, the general consensus amongst reviewers seemed to be that the money you needed to spend on an upgrade would be better spent on a better quality lens. So the answer to the pixel question is that we seem to have now reached a point where enough is enough.
There is also a school of thought that we have reached the limit of the number of photo sensors that we can fit on a chip and that a greater number will cause the indivdual cells to be too small compared to the space in between them. Usually though, when someone says something like that, the following week the boffins announce a breakthrough which makes it all nonsense.
You may have seen adverts for cameras, costing many thousands, that have 16 or 20 million pixels. These have sensors that are twice the size of those in the consumer cameras, hence the price. To me, the resolution of a 8 or 10 million pixel camera with a decent lens seems good enough for most purposes and on a par with the quality I used to get from a 35mm film camera.
In the past I have spent a lot of time and money in the pursuit of ultimate quality, I have owned a 5x4inch plate camera, a Hassleblad and two Mamiya medium format cameras, every major brand of 35mm camera and in the end, I would be hard pushed to tell you which photo on the wall was taken with which camera. A fellow photographer once observed that photographers tend to smell pictures rather than look at them, by which he meant that they were more interested in the graininess and sharpness of the image than the actual content of the image itself.