In the practical application of CdZnTe photon counting detectors, severe detector counting distortion can be caused by pulse pileup. A count rate correction method in this paper is proposed to solve this problem. In this method, the case where multi-photons are recorded by higher energy regions due to pulse pileup crossing the energy threshold is considered to calculate the true count rates under all energy bins. A verification method based on Poisson distribution is also proposed to evaluate the accuracy of the correction method. A 16-pixel linear array CdZnTe photon counting detector was used for verification. Taking the dual-energy bin as an example, this method was introduced, and the true count rates of the high- and low-energy bins are successfully calculated. The result was highly consistent with the verification result, which proves the reliability of the proposed method.