We discuss a method for revealing a photon-number-splitting (PNS) attack in a quantum key distribution (QKD) system, which is based on analyzing the statistical distribution of photon numbers detected in each time interval. A relation for estimating the difference between the expected photon-number distribution and the one appearing in the course of a PNS attack is derived. An equation defining the minimum number of counts necessary for revealing the attack with desired probability is given. Formulas for calculating the amount of raw keys known to an illegitimate user due to a PNS attack are obtained depending on the system’s total loss. The main advantage of the method is the possibility of using it in QKD systems without significant modifications in the protocol or experimental setup.