Photon-number resolving (PNR) single-photon detectors are of interest for a
wide range of applications in the emerging field of photon based quantum
technologies. Especially photonic integrated circuits will pave the way for a
high complexity and ease of use of quantum photonics. Superconducting nanowire
single-photon detectors (SNSPDs) are of special interest since they combine a
high detection efficiency and a high timing accuracy with a high count rate and
they can be configured as PNR-SNSPDs. Here, we present a PNR-SNSPD with a four
photon resolution suitable for waveguide integration operating at a temperature
of 4 K. A high statistical accuracy for the photon number is achieved for a
Poissonian light source at a photon flux below 5 photons/pulse with a detection
efficiency of 22.7 +- 3.0% at 900 nm and a pulse rate frequency of 76 MHz. We
demonstrate the ability of such a detector to discriminate a sub-Poissonian
from a Poissonian light source