Here's a nice application of measure theory, precisely, of the the theory of orthogonal polynomials, to a classic problem of counting derangements.
Problem: How many anagrams with no fixed letters of a given word are there?
For instance, for a word made of only two different letters, say $n$ letters $A$ and $m$ letters $B$, the answer is, of course, 1 or 0 according whether $n = m$ or not, for the only way to form an anagram without fixed letters is, exchanging all the $A$ with $B$, and this is possible if and only if $n=m$.
In the general case, for a word with $n_1$ letters $X_1$, $n_2$ letters $X_2$, ..., $n_r$ letters $X_r$, you will find (after the proper use of the inclusion-exclusion formula) that the answer has the form of a sum of products, that looks very much like the expansion of a product of sums, yet it is not. It is not, exactly because of the presence of terms $k!$, that would formally make a true expansion of a product of sums, if only they where replaced by corresponding terms $x^k$. This suggests to express them with the Eulerian integral $k!=\int_0^\infty x^ke^{-x}dx$, with the effect that the said expression becomes an integral (with the weight $e^{-x}$) of a true product of sums: precisely,
$$\int_0^\infty P_{n_1} (x) P_{n_2}(x)\cdots P_{n_r}(x)\, e^{-x}\, dx,$$
with a certain sequence of polynomials $P_n$, where $P_n$, has degree $n$. But the above answer for the case $r=2$ gives an orthogonality relation, whence the $P_n$, are the Laguerre polynomials, (up to a sign that is easily decided). Note that in the case with no repeated letters, all $n_i=1$, one finds again the more popular enumeration of permutations without fixed points.
Disclaimer: I partially copied this from wikipedia; it's me who wrote it there. The above is my personal amateur's solution, and possibly differs slightly from the vulgata. An on-line reference, with generalizations of the problem, is e.g.
Weighted derangements and Laguerre polynomials, D.Foata and D.Zeilberger, SIAM J. Discrete Math. 1 (1988) 425-433.
$$ \text{Edit 2024: Adding some details} $$
Let $\Lambda$ be a set of letters, $I:=\{1,\dots,n\}$ the index set for positions of letters, $\Lambda^I=\{f:I\to\Lambda\}$ the set of words of length $n$ in the alphabet $\Lambda$. Let $p\in \Lambda^I$. For $\lambda\in\Lambda$ let's denote $I_\lambda:=p^{-1}(\lambda)$ and $n_\lambda:=|I_\lambda|$, so $n=\sum_\lambda n_\lambda.$ Let $\mathfrak S_I$ denote the symmetric group on $I$. The orbit of $p$ by the action of $\mathfrak S_I$, that is the set of anagrams of the word $p$ is
$$A=\mathfrak S_I\cdot p=\{p\circ \sigma: \sigma\in\mathfrak S_I\}$$
so $$|A|=\frac{n!}{\prod_{\lambda\in\Lambda}n_\lambda!}.$$
For every subset $J\in 2^I$ and $\lambda \in\Lambda$ we put $J_\lambda:=I_\lambda\cap J$;
since $\{I_\lambda\}_{\lambda\in\Lambda}$ is a partition of $I$, we have a natural identification $2^I\sim\prod_{\lambda\in\Lambda}2^{I_\lambda}$ given by $J\mapsto (J_\lambda)_{\lambda\in\Lambda}$.
We want the cardinality of the set $A^*$ of the derangements of $p$, that is $$A^*:=\{f\in A: \forall i\in I f(i)\neq p(i)\}.$$ For the sake of the Inclusion-Exclusion formula it is convenient to consider, for every $J\subset I$
$$A_J:=\{f\in A: \forall i\in J \, f(i)=p(i)\}.$$
So $A_\emptyset=A$, $A_J\cap A_K=A_{J\cup K}$, and $A^*=A\setminus \bigcup_{i\in I}A_{\{i\}}$; also $|A_J|=\frac{|I\setminus J|!}{\prod_{\lambda\in\Lambda}|I_\lambda\setminus J_\lambda|!}$.
Then, by the Inclusion-Exclusion formula:
$$|A^*|=\sum_{J\in 2^I}(-1)^{|J|}|A_J|=\sum_{J\in\prod_{\lambda\in\Lambda}2^{I_\lambda}}\Big(\prod_{\lambda\in\Lambda}(-1)^{|J_\lambda|}\Big)\frac{\Big(\sum_{\lambda\in\Lambda}|I_\lambda\setminus J_\lambda|\Big)!}{\prod_{\lambda\in\Lambda}|I_\lambda\setminus J_\lambda|!}=$$
$$=\sum_{K\in\prod_{\lambda \in\Lambda}2^{I_\lambda}}\Big(\prod_{\lambda\in\Lambda}(-1)^{|I_\lambda|-|K_\lambda|}\Big)\frac{\Big(\sum_{\lambda\in\Lambda}|K_\lambda|\Big)!}{\prod_{\lambda\in\Lambda}|K_\lambda|!}=$$$$=\sum_{K\in\prod_{\lambda \in\Lambda}2^{I_\lambda}}\bigg(\prod_{\lambda\in\Lambda}\frac{(-1)^{|I_\lambda|-|K_\lambda|}}{|K_\lambda|!}\bigg)\int_0^\infty x^{\sum_{\lambda\in\Lambda}|K_\lambda|}e^{-x}dx=$$$$=\int_0^\infty \bigg(\sum_{K\in\prod_{\lambda \in\Lambda}2^{I_\lambda}} \prod_{\lambda\in\Lambda}(-1)^{|I_\lambda|-|K_\lambda|}\frac{x^{ |K_\lambda|}}{|K_\lambda|!}\bigg)e^{-x}dx= $$$$=\int_0^\infty \prod_{\lambda\in\Lambda}\bigg(\sum_{S\in 2^{I_\lambda}}(-1)^{|I_\lambda|-|S|}\frac{x^{ |S|}}{|S|!}\bigg)e^{-x}dx=\int_0^\infty \prod_{\lambda\in\Lambda}P_{n_\lambda}(x)e^{-x}dx,$$
where we lastly used the expansion formula
$$\prod_{\lambda\in\Lambda}\sum_{j\in X_\lambda}c(\lambda,j)=\sum_{\phi\in\prod_{\lambda\in\Lambda}X_\lambda}\prod_{\lambda\in\Lambda}c(\lambda,\phi(\lambda))$$
and we put for all $m\in\mathbb N$
$$P_m(x):=\sum_{S\in 2^{[m]}}(-1)^{m-|S|}\frac{x^{ |S|}}{|S|!}= (-1)^m\sum_{k=0}^m(-1)^k{m\choose k}\frac{x^k}{k!}.$$
(Note that the above computation also gives a combinatorial proof of the ortogonality of the Laguerre polynomials defined as above).