In optics, the ability to measure individual quanta of light (photons) enables a great many applications, ranging from dynamic imaging within living organisms to secure quantum communication. Pioneering photon counting experiments, such as the intensity interferometry performed by Hanbury Brown and Twiss to measure the angular width of visible stars, have played a critical role in our understanding of the full quantum nature of light. As with matter at the atomic scale, the laws of quantum mechanics also govern the properties of macroscopic mechanical objects, providing fundamental quantum limits to the sensitivity of mechanical sensors and transducers. Current research in cavity optomechanics seeks to use light to explore the quantum properties of mechanical systems ranging in size from kilogram-mass mirrors to nanoscale membranes, as well as to develop technologies for precision sensing and quantum information processing. Here we use an optical probe and single-photon detection to study the acoustic emission and absorption processes in a silicon nanomechanical resonator, and perform a measurement similar to that used by Hanbury Brown and Twiss to measure correlations in the emitted phonons as the resonator undergoes a parametric instability formally equivalent to that of a laser. Owing to the cavity-enhanced coupling of light with mechanical motion, this effective phonon counting technique has a noise equivalent phonon sensitivity of 0.89 ± 0.05. With straightforward improvements to this method, a variety of quantum state engineering tasks using mesoscopic mechanical resonators would be enabled, including the generation and heralding of single-phonon Fock states and the quantum entanglement of remote mechanical elements.