  We study counting statistics of number of transitions in a stochastic
process. For mesoscopic systems, a path integral formulation for the counting
statistics has already been derived. We here show that it is also possible to
derive the similar path integral formulation without the assumption of
mesoscopic systems. It has been clarified that the saddle point method for the
path integral is not an approximation, but a valid procedure in the present
derivation. Hence, a variational principle in the counting statistics is
naturally derived. In order to obtain the variational principle, we employ many
independent replicas of the same system. In addition, the Euler-Maclaurin
formula is used in order to connect the discrete and continuous properties of
the system.
