  The large-deviation method allows to characterize an ergodic counting process
in terms of a thermodynamic frame where a free energy function determines the
asymptotic non-stationary statistical properties of its fluctuations. Here, we
study this formalism through a statistical mechanics approach, i.e., with an
auxiliary counting process that maximizes an entropy function associated to the
thermodynamic potential. We show that the realizations of this auxiliary
process can be obtained after applying a conditional measurement scheme to the
original ones, providing is this way an alternative measurement interpretation
of the thermodynamic approach. General results are obtained for renewal
counting processes, i.e., those where the time intervals between consecutive
events are independent and defined by a unique waiting time distribution. The
underlying statistical mechanics is controlled by the same waiting time
distribution, rescaled by an exponential decay measured by the free energy
function. A scale invariance, shift closure, and intermittence phenomena are
obtained and interpreted in this context. Similar conclusions apply for
non-renewal processes when the memory between successive events is induced by a
stochastic waiting time distribution.
