Photon counting is the sensing of photons by an instrument (photon counter) down to the level of a single photon, producing a radiant flux measurement in terms of the number of photons received. It has become achievable for very low levels of electromagnetic radiation, which is also where such precision is most useful. A variety of types of devices can do it, each oriented to some portion of the electromagnetic spectrum. CCDs can be designed to do it, making them a bit specialized.
There is always an efficiency rating of how many received photons are actually counted, but under the best circumstances, the vast majority are counted. One general technique is: for a device with just two states, "received a photon", and "received no photon", to read and reset its state frequently. In such a case, a contribution to imperfect efficiency is general statistics on the rate of received photons.
Astronomers invariably attempt to get maximum information from extremely small amounts of EMR, such as from very distant sources, the motivation for exposure times of minutes, hours, or even days. Astronomical telescopes of all bands can make good use of individual photon counting where this is achievable.