Example 5 Let $p_{1}, p_{2}, \cdots, p_{n}$ be a given set of positive integers, $r$ be any positive integer, and $p_{1} x_{1}+p_{2} x_{2}+\cdots+$ $p_{n} x_{n}=r$, find the number of all non-negative integer solution sets $\left(x_{1}, x_{2}, \cdots x_{n}\right)$.
Let $a_{r}$ denote the number of non-negative integer solutions to the equation above. We seek the generating function for $\left\{a_{r}\right\}$.
The term $p_{i} x_{i}$ in the equation can be interpreted as follows: the multiples of $p_{i}$ are $0,1,2, \cdots$; $\left(t^{p}\right)^{0}$ represents 0 times, $t^{p}$ represents $p_{i}$ taken 1 time, $\left(t^{p_{1}}\right)^{2}$ represents $p_{i}$ taken 2 times, $\cdots$. Thus, the generating function for the number of solution sets of the indeterminate equation is
$$
\begin{aligned}
f(t) & =\left[1+t^{p}+\left(t^{p_{1}}\right)^{2}+\cdots\right]\left[1+t^{p_{0}}+\left(t^{p_{i}}\right)^{2}+\cdots\right] \cdots\left[1+t^{p_{0}}+\left(t^{p_{0}}\right)^{2}+\cdots\right] \\
& =\frac{1}{1-t^{p_{0}}} \frac{1}{1-t^{p_{0}}} \cdots \frac{1}{1-t^{p_{0}}}
\end{aligned}
$$

Expanding this expression, the coefficient of $t^{r}$ gives $a_{r}$.