We demonstrate a superconducting photon-number-resolving detector capable of resolving up to twelve photons at telecommunication wavelengths. It is based on a series array of twelve superconducting NbN nanowire elements, each connected in parallel with an integrated resistor. The photon-induced voltage signals from the twelve elements are summed up into a single readout pulse with a height proportional to the detected photon number. Thirteen distinct output levels corresponding to the detection of n = 0-12 photons are observed experimentally. A detailed analysis of the linearity and of the excess noise shows the potential of scaling to an even larger dynamic range.