  We derive a closed photo-counting formula, including noise counts and a
finite quantum efficiency, for photon number resolving detectors based on
on-off detectors. It applies to detection schemes such as array detectors and
multiplexing setups. The result renders it possible to compare the
corresponding measured counting statistics with the true photon number
statistics of arbitrary quantum states. The photo-counting formula is applied
to the discrimination of photon numbers of Fock states, squeezed states, and
odd coherent states. It is illustrated for coherent states that our formula is
indispensable for the correct interpretation of quantum effects observed with
such devices.
