Modern photon‐counting pixel detectors have enabled a revolution in applications at synchrotron light sources and beyond in the last decade. One of the limitations of the current detectors is their reduced counting linearity or even paralysis at high counting rates, due to dead‐time which results in photon pile‐up. Existing dead‐time and pile‐up models fail to reproduce the complexity of dead‐time effects on photon‐counting, resulting in empirical calibrations for particular detectors at best, imprecise linearization methods, or no linearization. This problem will increase in the future as many synchrotron light sources plan significant brilliance upgrades and free‐electron lasers plan moving to a quasi‐continuous operation mode. Presented here are the first models that use the actual behavior of the analog pre‐amplifiers in spectroscopic photon‐counting pixel detectors with constant current discharge (e.g. the Medipix and CPix families of detectors) to deduce more accurate analytical models and optimal linearization methods. In particular, for detectors with at least two counters per pixel, the need for calibration, or previous knowledge of the detector and beam parameters (dead‐time, integration time, large sets of synchrotron filling patterns), is completely eliminated. This is summarized in several models of increasing complexity and accuracy. Finally, a general empirical approach is presented, applicable to any particular cases where the analytical approach is not sufficiently precise.