By building upon a Feynman-Kac formalism, we assess the distribution of the number of collisions in a given region for a broad class of discrete-time random walks in absorbing and nonabsorbing media. We derive the evolution equation for the generating function of the number of collisions, and we complete our analysis by examining the moments of the distribution and their relation to the walker ...