For reference, go look in your (or almost anyone's home) kitchen.
See the kitchen cabinets? Fastened to the wall studs? With ~100 pounds of dishes and glassware in them?
Fasten adjacent cabinets together (if possible) to spread the load out to multiple studs. Fasten the cabinets to multiple studs if possible. Use a 'decent' screw (NOT a drywall screw!!!) to fasten the cabinets to the studs.
And Scott, most construction has the 2x4 wall studs spaced 16" on center, and a lot of 'recent/modern' construction may have those wall studs spaced 24" on center. 12" on center for wall studs is not too common. Possible, but not too common.
Unless you are talking wall racks holding steel plate/bars or engine blocks, most of the time for a 'cabinet' as long as it spans and is fastened to more than one wall stud and uses decent screws (did I mention to NOT use drywall screws?

) you usually don't have to worry about it.
Want a bit of overkill? Mount horizontal 2x4's at the top and bottom of the cabinet mounting areas. Screw those 2x4's to the wall studs with the SPAX or GRK or similar 'structural' screws. Flat 2x4 is 1.5" thick plus add the drywall thickness (might be 1/2" or 5/8" most commonly, unless it is a 'firewall' from an attached garage to the house and then it might be double 5/8" drywall) plus at least 1.5" of actual 'attachment' depth into the actual wall stud, so you will need about a 4" long screw to actually reach into the wall stud. Mount your cabinets to those 2x4 mounting strips using the SPAX or GRK or similar screws. Your cabinets will be 1.5" away from the drywall, but those mounting strip 2x4's will be SOLIDLY mounted to multiple wall studs and you then don't have to even 'worry' about trying to get a screw through the cabinet and lined up into the edge of a wall stud.
http://www.spax.us/en/power-lags.html
A 1/4" diameter SPAX PowerLag screw has a shear strength of about 766 pounds and a tensile strength of 1169 pounds. The wood will fail before that.
https://www.icc-es.org/wp-content/uploads/report-directory/ESR-1782.pdf