NaLa, the DPI thing is complicated. It's a rule of thumb that you need to
print at 300 dpi for "true" photo quality output. For a 12 megapixel camera this would allow you to print up to approximately 9"x14". There's a chart at
http://www.design215.com/toolbox/megapixels.php that illustrates this. (With charts like this, who needs to do their own math?)
But what is "true" photo quality? I can't find a reference site, but I seem to remember that it was to compare the output of digital cameras with film cameras when taking a picture of a person (with complicated gradations of skin tones and shadows) and viewed at a distance of 12 inches.
If you're viewing from a greater distance, you don't need as much resolution. If you're photographing artwork that doesn't have complicated tone gradations and don't need to hold extremely fine line detail, you also won't need as much resolution. Check
http://www.pcworld.com/article/128982/determining_your_cameras_largest_print_size.html for a simple overview. It points out that a camera's sensor size (and quality) as well as exposure settings also affect final quality. Also check:
http://www.kenrockwell.com/tech/mpmyth.htm.
Using a tripod (or setting the camera on a table) and using the camera's timer (2 seconds is plenty, just so there's no shake from pushing that button) increases a picture's quality significantly, regardless of DPI.
An image destined for a glossy magazine that uses 1200 DPI screens requires more resolution than one printed at home on an inkjet printer. If you
ARE printing at home, glossy paper requires more resolution than matte or rough finishes (to get the same perceived quality of output).
Hope this is more helpful than just mind-numbing.