In many articles (e.g. in Wikipedia https://en.wikipedia.org/wiki/Monte_Carlo_integration ), Monte Carlo integration is introduced as an numerical approximation of an integration over $n$ dimensional real space. However, actually in many situations monte carlo method seems to be used to integrate over infinite discrete set. My question is how can we mathematically formulate Monte Carlo integration over infinite discrete set in general?
Motivating example
One motivating example is a random walk by coin toss. $ x_{k+1} = x_k + w$ where $w_k$ is ${-1, +1}$ in the equal probability corresponding to the coin toss. Let us write such a particular sequence as $\omega$ and the infinite discrete set of such sequences as $\Omega$. Also, let us consider whatever function $f: \Omega \to \mathbb{R}$. An example for $f$ is minimum coin-toss trial number such that $x$ becomes $10$, mathematically $f(\omega) = \min\{k: x_k = 10\}$.
In such case, computation of expectation value of $f$ is easily done by Monte Carlo method using computer. (Note that, random walk is just an example, and this question is not particularly talking about random walk.)
Another motivating example frequently appears in engineering is image rendering by ray-tracing (https://en.wikipedia.org/wiki/Ray_tracing_(graphics)). Image rendering in that way can be considered as computation of expected value (color) of each pixel using Monte-Carlo method, where, randomness typically appears in reflection.
note
I guess this question is probably related to measure theory and Lebesgue integration. Reading through the textbook of measure-theoretic probability, I can guess that I have to specify some $\sigma$-algebra and some measure $\mu$, but its not clear to me how to actually specify these things.