Commercial photon-counting modules, often based on actively quenched solid-state avalanche photodiode sensors, are used in wide variety of applications. Manufacturers characterize their detectors by specifying a small set of parameters, such as detection efficiency, dead time, dark counts rate, afterpulsing probability and single photon arrival time resolution (jitter), however they usually do not specify the conditions under which these parameters are constant or present a sufficient description. In this work, we present an in-depth analysis of the active quenching process and identify intrinsic limitations and engineering challenges. Based on that, we investigate the range of validity of the typical parameters used by two commercial detectors. We identify an additional set of imperfections that must be specified in order to sufficiently characterize the behavior of single-photon counting detectors in realistic applications. The additional imperfections include rate-dependence of the dead time, jitter, detection delay shift, and «twilighting.» Also, the temporal distribution of afterpulsing and various artifacts of the electronics are important. We find that these additional non-ideal behaviors can lead to unexpected effects or strong deterioration of the system's performance. Specifically, we discuss implications of these new findings in a few applications in which single-photon detectors play a major role: the security of a quantum cryptographic protocol, the quality of single-photon-based random number generators and a few other applications. Finally, we describe an example of an optimized avalanche quenching circuit for a high-rate quantum key distribution system based on time-bin entangled photons.