  This work presents stochastic approaches to model the counting behavior of
actively quenched single-photon avalanche diodes (SPADs) subjected to
continuous-wave constant illumination. We present both analytical expressions
and simulation algorithms predicting the distribution of the number of
detections in a finite time window. We also present formulas for the mean
detection rate. The approaches cover recovery time, afterpulsing, and twilight
pulsing. We experimentally compare the theoretical predictions to measured data
using commercially available silicon SPADs. Their total variation distances
range from $10^{-5}$ to $10^{-2}$.
