Abstract. We consider a quadruple (Ω, A , ϑ, μ), where A is a σ-algebra of subsets of Ω, and ϑ is a measurable bijection from Ω into itself that preserves a finite measure μ. For each B ∈ A , we define and study the measure μ B obtained by integrating on B the number of visits to a set of the trajectory of a point of Ω before returning to B. In particular, we obtain a generalization of Kac's formula and discuss its relation to discretetime Palm theory. Although classical in appearance, its use in obtaining uniqueness of invariant measures of various stochastic models seems to be new. We apply the concept to countable Markov chains and Harris processes in general state space.