  We derive a closed-form combinatorial expression for the number of states in
canonical systems with discrete energy levels. The expression results from the
exact low-temperature power series expansion of the partition function. The
approach provides interesting insights into basis of statistical mechanics. In
particular, it is shown that in some cases the logarithm of the partition
function may be considered the generating function for the number of internal
states of energy clusters, which characterize system's microscopic
configurations. Apart from elementary examples including the Poisson, geometric
and negative binomial probability distributions for the energy, the framework
is also validated against the one-dimensional Ising model.
