.Efficient and precise photon-number-resolving detectors are essential for optical quantum information science. Despite this, very few detectors have been able to distinguish photon numbers with both high fidelity and a large dynamic range, all while maintaining high speed and high timing precision. Superconducting nanostrip-based detectors excel at counting single photons efficiently and rapidly, but face challenges in balancing dynamic range and fidelity. Here, we have pioneered the demonstration of 10 true photon-number resolution using a superconducting microstrip detector, with readout fidelity reaching an impressive 98% and 90% for 4-photon and 6-photon events, respectively. Furthermore, our proposed dual-channel timing setup drastically reduces the amount of data acquisition by 3 orders of magnitude, allowing for real-time photon-number readout. We then demonstrate the utility of our scheme by implementing a quantum random-number generator based on sampling the parity of a coherent state, which guarantees inherent unbiasedness, robustness against experimental imperfections and environmental noise, as well as invulnerability to eavesdropping. Our solution boasts high fidelity, a large dynamic range, and real-time characterization for photon-number resolution and simplicity with respect to device structure, fabrication, and readout, which may provide a promising avenue towards optical quantum information science.