Cavity-QED systems have recently reached a regime where the light-matter interaction strength amounts to a non-negligible fraction of the resonance frequencies of the bare subsystems. In this regime, it is known that the usual normal-order correlation functions for the cavity-photon operators fail to describe both the rate and the statistics of emitted photons. Following Glauber's original approach, we derive a simple and general quantum theory of photodetection, valid for arbitrary light-matter interaction strengths. Our derivation uses Fermi's golden rule, together with an expansion of system operators in the eigenbasis of the interacting light-matter system, to arrive at the correct photodetection probabilities. We consider both narrow- and wide-band photodetectors. Our description is also valid for point-like detectors placed inside the optical cavity. As an application, we propose a gedanken experiment confirming the virtual nature of the bare excitations that enrich the ground state of the quantum Rabi model.