The parallel nanowire detector (PND) is a photon number resolving (PNR) detector that uses spatial multiplexing on a subwavelength scale to provide a single electrical output proportional to the photon number. The basic structure of the PND is the parallel connection of several NbN superconducting nanowires (approximate to 100 nm wide, a few nm thick), folded in a meander pattern. PNDs were fabricated on 3-4 nm thick NbN films grown on MgO(T-S = 400 degrees C) substrates by reactive magnetron sputtering in an Ar/N-2 gas mixture. The device performance was characterized in terms of speed and sensitivity. PNDs showed a counting rate of 80 MHz and a pulse duration as low as 660 ps full-width at half-maximum (FWHM). Building the histograms of the photoresponse peak, no multiplication noise buildup is observable. Electrical and optical equivalent models of the device were developed in order to study its working principle, define design guidelines and develop an algorithm to estimate the photon number statistics of an unknown light. In particular, the modeling provides novel insight into the physical limit to the detection efficiency and to the reset time of these detectors. The PND significantly outperforms existing PNR detectors in terms of simplicity, sensitivity, speed and multiplication noise.