I'm sorry to reply you that a number of megapixels per inch (which is not resolution, and not even exactly the definition, but the pixel density for a specific media) also means nothing for photography : the capturing area size varies depending on the inner focale length, and is not a factor of quality, because what will matter is the distance of observation to the photo once it will be reproduced to a media (including the small screen of the camera, or a large HDTV screen, or a printed photo) : in such condition, the real limiting factor will not be that of the capturing camera sensor, but the nature and size of the media of reproduction that will be observed (nobody can observe the camera sensor directly, and its dimension has nothing in common with the size of the captured scene, and is much smaller).
Note that all numeric cameras often display a focal length equivalent which is actually 2 or 3 times longer than the effective focale length used (notably on compact cameras), and sometimes even more (microcameras, such as webcams). This is generally indicated by a multiplication factor which allows conversion of classic focal lengths used in argentic cameras for 24x36cm Kodakchrome films. This factor has nothing to do with the optical zoom factor (or the optional numeric zoom factor in which a central part in the captured image can be rescaled up by interpolation, and with tiny details better preserved by the lossy JPEG compression of this interpolated image).
But things are in fact much more complex, because the actual pixel resolution of the capturing cell is just an average computed after ignoring how the RGB pixels are effectively created: if you don't know what I mean, look at the Wikipedia article about "demosaicing". Effectively, an sRGB image assumed with the JPEG format attempts to map pixels as quares that never overlap. But most cameras actually don't have square pixels, but instead a mesh of subpixels that do not entirely fill the theoretical square, that are not necessarily captured at the same time for each color plane, and that are not necessarily useing the theoretical three pigments of the sRGB model; in addition the subpixel geometry really matters (newer cameras use arrangements of subpixels where there me be twice more green supixels than red or blue, and their arrangement is not necessarily an horizontal band of 3 tall rectangular subpixels like on most TFT/LCD display panels; other will include a white subpixel taking half of the total cputuring area, to better capture the subtle light differences).
Due to the subpixel geometries and the difference in the number pigments and differences in their relative proportions of surface, and difference in intervals of times where each supixel captures the light, and differences caused by microlenses, or color filters on top of the photoreactive captor, the camera firmware includes a demosaicing algorithm that will rebuild an image into the sRGB model and at the same timestamp for the whole area : this implies an interpolation, which can create color magenta fringes and other aberrations. Some algorithms may be aded on top of this to correct these artefacts created by the demosaicing algorithm.
Then you must know that the demosaicing algorithm implemented in the camera is highly dependant on the computing capability of the camera, notably for images captures at its maximum definition (i.e. using data from all subpixels captured from the sensor). In addition the demosaicing process, because it uses interpolation, must convert the light scales into a linear scale suitable for this interpolation, but the sensibility of the cells is most often not linear. To keep the precision of colors, a raw subpixel captured with (for e.g.) 10 bits of precision will first be converted to a scale with 14 bits of precision, but for the geometric demosaicing interpolation, 16 bit of precision per subpixel will be needed to create the 16 bits of precision for the computed theoretical sRGB pixels. Then, additional filters will be applied to correct color artefacts created by the demosaicing process itself (trying to limit the color fringing), which will slightly reduce the pixel resolution.
If the camera does not allow you to get the RAW captured images (without the demosaicing implemented in the camera by its limited graphic processor), but only the computed RAW image after demosaicing (in a format such as TIFF or PNG), or the JPEG image (which is lossy, both in terms of spacial pixel resolution and color/light resolution: the spacial pixel resolution of a JPEG-compressed image is considered to be one half of the pixels you get when decompressing it to a sRGB flat image, this is a property of the Shannon-Fano principles on signal sampling).
Finally, optical and physical factors really matter when you compare camera. Notably, the natural colors through any lens will never focus at the same length (the red wavelengths are longer than green then blue wavelengths, but will be more refracted through the lens, with also a more important part that will be reflected on the surface of the lens, and a more important part that will be absorbed in the lens itself and never reaching the caputuring area). This creates a slight dispersion of light (and then color information) to the surrounding capturing cells, when the focal length is adjusted for the median (green) wavelegnth, for the blue and red color components.
Optical properties are extremely complex to analyze, and before you compare the commervcially advertized pixel definition of cameras, you have to look at other information which camera makers aften forget to give clearly : notably what is the exact nature of the sensor, with its supixel gemetry type, or if the sensor includes microlens (some microlenses are also controled in their form by a piezoelectric system that allow them to adjust the focale and orientation that will also physically correct the geometry to realign the subpixels without using the lossy demosaicing interpolation), which demosaicing algorithm is used, what is the sampling resolution (in bits per subpixel), what is the resolution of the intermediate conversion to linear scale used by the interpolating process, what is the final resolution in bits per computed color component and per pixel of the demosaicized image (before JPEG compression), which type of numeric filter is applied to correct coolor fringes, if a noise reduction filter is used, how it is computed (bilinear, gaussian...) and with which radius (because this also reduces the effective definition in pixels, it's better if the camera sensor is not too much influenced by temperature, as it creates very visible random noise in dark areas, whose effect is MUCH more important on numeric cameras than on argentic films where the noise is much better spread in nanoscoping areas, and smoothed by the randomized pattern of argentic particles).
So a numeric camera has a lot of factors influencing the effective resolution you get in your snapshots. Some are physical and can be controled by better lithography (using less thermoresistive components in the cells, and reducing the currents flowing through the transistors, and reducing the electron dispersion leaking within the substrate to surrounding subpixels) and by a cooling system (between captures, the electronic charges must be moved out of the cells and this current generates heat that will reduce the sensitity and precision of the captured charges), or by faster sampling electronic. Some are opto-physical factors (variable wavelengths creating color dispersion through lens due to differential refraction indices : a piezolectric microlens system greatly improves this, but it requires additonal currents and generates additional heat which creates noise); some or purely physical (the geometric precision of the lens, and the opening of the diaphragm); most effects are introduced by the demosaicing process (and then by the processor capabilities and computing precision of the implemented algorithm), and finally by the numeric precision of the JPEG compression (notably the desampling factors in its transformation matrix or within the DCT conversion for intermediate additive terms, and in the spacial correction of accumulated sampling errors).
Note that compact cameras are very sensitive to noise, exactly because of temperature and the limited processor capabilities (and limitation of their batteries) and the very small lens (to get enough light, the diaphragm opening is relatively larger, and color aberrations due to opto-physical differential refraction is much more important, even if they use the same photosensor with the same subpixel geometry. Nothing can replace a good large optical system, using a longer foccal length. If you can, choose a camera with a x1 focal length instead of a x3, which allows for a larger diaphragm opening with lower refractive color aberrations. It also allows for a better cooling system on the sensor, and faster snapshots (more immune to motion blurs that reduce the spacial resolution).
Another factor is also the type of flash on the camera : if possible use a Xenon flash, because it lights maximally almost instantly to a pure white throughout the capturing opening time (other types of flashs do not light completely to white but can light up slowly in red wavelengths long before green and blue, and the subpixels will not be captured at the same time, causing more color artefacts during the demosaicing process). This explains why photos taken on most smartphones are reddish/yellowish, even with the flash (whish is very poor and slowly varies from red to orange then then some rosish white). These cameras can give correct colors only outdoor, during the day, under sunny conditions but not directly under sun exposure, and with enough indirect light reflections, where you don't need the flash.
Unfortunately, Xenon flashes require extensive battery charges, and huge batteries are not suitable on smartphones and compact cameras if you want good autonomy for enough clich?s. In addition, to get the necessary precharge, you need to wait for several seconds before taking the snapshot (otherwise the batteries will not be able to deliver the current without excessive temperature heating). You can avoid this heating problem if you use more battery cells in parallel (but this increases the price of the camera). For taking a high quality video ith good colors, nothing will replace an external source of light (i.e. powerful spotlights)