Which property of pixel resolution (many megapixels) and spatial resolution (many dpi) influences the quality of the resulting product more?
For example, of 16 MP at 72 dpi and 7 MP at 300 dpi , which would give the best result?
In your case, you will probably want to use the image with the highest resolution, which is the 16MP one (16>7). However, you will want to render it in the resolution 300 dpi or higher to get detail in the image.
"DPI" = "dots per inch" = "pixels per inch".
16MP usually means a picture of pixel dimension of (in 4:3) 4608x3456. If you render this in 72 dpi, then the image will be (4608/72)x(3456/72) pixels/(pixels/inch) = 64x48 inches, with the resolution of 72 dpi.
7MP@300 dpi similarly means (in 4:3) 3072*2304 pixels, which would render at 10.2x7.7 inches with a resolution of 300 dpi.
The resolution determines how fine-grained an image is. For printing, >300 dpi is most often used. For on-screen display, 72 dpi is usually enough.
The more megapixels, the more detail in the image. In which resolution you want to render it is up to you. (However, "more MP" does not equal "better camera" or "better image" - there are lots of other factors involved, no matter what some manufacturers want to claim.)
Read more about image resolution to understand the difference. Your question in its current form does not make sense, really - one can't compare resolution and pixel count in that way. Read the linked Wikipedia entry.
A pixel doesn't have a size like other physical objects. It can't be measured in centimeters or inches.
But once you want to display that pixel, it gets a size. Either by putting it on a screen, or by putting it on a piece of paper. You could put a ruler next to it and measure the real-world size.
How many pixels will be put in a certain area is controlled by how many pixels (or dots) the device can put on an inch (the DPI). For example, common display devices have a dpi of between 72 and 100.
If you're going to put the image on paper, then it's getting interesting. We can put a lot more dots in a space with printers than we can with a computer display (iPad3 excluded).
Imaging you have 1 pixel at 1dpi on a 1inchx1inch piece of paper. Now you have a piece of paper with a single pixel on it. Awesome.
Now, what do you want? Do you want your pixel to be on a bigger piece of paper? Or are you fine with the size of the paper, but you want to see more pixels?!
The pixel resolution (a dimensionless size, given in pixels or megapixels) is the number of small dots your picture is made up from. The spatial resolution (with dimension inverse distance, sometimes given in dpi) is the number of small dots it should take to fill a length unit (an inch if you are given dpi).
If you are looking at a scanner or a printer, it will have a spatial resolution that determines how small details it can produce. A larger pixel resolution (more megapixels) represents a larger picture as there are more pixels to fill more distance. A high spatial resolution (many dpi) will be better than a low resolution, all other properties being invariant.
If you are looking at different image files or other digital sources, the spatial resolution is just a number suggesting how the picture should be scaled for display, and can be changed at will The pixel resolution (in megapixels) determines the amount of detail available. The same is true for a camera or projector, as the spatial resolution can only represent how close the camera or projector is to the motive/screen.
The comparison is pretty meaningless.
The size of the image in mega pixels is really a marketing number. You need to look at the dimensions of an image (1600 x 1200, 4608 x 3456, etc). But in general the higher the number the more details you can have in your image.
Then when you print it out the dpi (or dots per inch) becomes important. This controls how pixelated the image will appear when printed. The higher the dpi the less pixelated the image, but the smaller the physical photo.
For digital image DPI (or more accurately PPI = pixels per inch) doesn't mean anything. The only value you need to look at is resolution in pixels. So width (W) and height (H). Megapixels = W * H / 1000000.
When you are printing digital image on paper or other media, you set the desired dimensions in inches. Those dimensions together with the size of image in pixels determine DPI/PPI. PPI = W(pixels) / W(inches).
A device where the important value is Megapixels is digital camera.
A device where DPI/PPI is important is scanner. PPI will determine how many pixels you can get for digital image for each inch of the photograph you are scanning.