  The key requirement for harnessing the quantum properties of light is the
capability to detect and count individual photons. Of particular interest are
photon-number-resolving detectors, which allow one to determine whether a state
of light is classical or genuinely quantum. Existing schemes for addressing
this challenge rely on a proportional conversion of photons to electrons. As
such, they are capable of correctly characterizing small photon fluxes, yet are
limited by uncertainties in the conversion rate. In this work, we employ a
divide-and-conquer approach to overcome these limitations by transforming the
incident fields into uniform distributions that readily lend themselves for
characterization by standard on-off detectors. Since the exact statistics of
the light stream are obtained from the click statistics, our technique is
freely scalable to accommodate - in principle - arbitrarily large photon
fluxes. Our experiments pave the way towards genuine integrated
photon-number-resolving detectors for advanced on-chip photonic quantum
networks.
