Given positive integers $m, n (m \leqslant n)$, let $A=\{1,2, \cdots, n\}$. Find the number of mappings $f: A \rightarrow A$ that satisfy the following conditions:
(1) $f$ takes exactly $m$ values;
(2) If $k, l \in A, k \leqslant l$, then,
$$
f(f(k))=f(k) \leqslant f(l).
$$
From condition (2), we know that $f$ is a non-decreasing function, and
$$
f(f(x))=f(x) \text {. }
$$

Let the range of $f$ be $\left\{a_{1}, a_{2}, \cdots, a_{m}\right\}$, and the array $\left\{x_{1}, x_{2}, \cdots, x_{m}\right\}$ satisfies $x_{1}+x_{2}+\cdots+x_{m}=n$, and
$$
\begin{array}{l}
f(1)=f(2)=\cdots=f\left(x_{1}\right)=a_{1}, \\
f\left(x_{1}+1\right)=f\left(x_{1}+2\right)=\cdots=f\left(x_{1}+x_{2}\right)=a_{2}, \\
\cdots \cdots \\
f\left(x_{1}+x_{2}+\cdots+x_{m-1}+1\right)=\cdots=f\left(x_{1}+x_{2}+\cdots+x_{m}\right)=a_{m} .
\end{array}
$$

Then $x_{i}$ and $a_{i}$ satisfy:
(i) $a_{i} \leqslant x_{1}+x_{2}+\cdots+x_{i}$. Otherwise,
$$
\begin{array}{l}
a_{i}>x_{1}+x_{2}+\cdots+x_{i} \\
\Rightarrow f\left(a_{i}\right)>f\left(x_{1}+x_{2}+\cdots+x_{i}\right)=a_{i}>x_{1}+x_{2}+\cdots+x_{i} \\
\Rightarrow f\left(f\left(x_{1}+x_{2}+\cdots+x_{i}\right)\right)>f\left(x_{1}+x_{2}+\cdots+x_{i}\right) .
\end{array}
$$

Contradiction.
(ii) $a_{i} \geqslant x_{1}+x_{2}+\cdots+x_{i-1}+1$. Otherwise,
$$
\begin{array}{l}
a_{i} \leqslant x_{1}+x_{2}+\cdots+x_{i-1} \\
\Rightarrow f\left(a_{i}\right)<a_{i} \\
\Rightarrow f\left(f\left(x_{1}+x_{2}+\cdots+x_{i}\right)\right)<f\left(x_{1}+x_{2}+\cdots+x_{i}\right) .
\end{array}
$$

Contradiction.
(iii) $a_{i}$ can take any positive integer in the interval $\left[x_{1}+x_{2}+\cdots+x_{i-1}+1, x_{1}+x_{2}+\cdots+x_{i}\right]$.

When $a_{i}$ takes any integer in this interval, the mapping $f: A \rightarrow A$ defined by the above equations satisfies the requirements.

The above discussion shows: When the array $\left\{x_{1}, x_{2}, \cdots, x_{m}\right\}$ is given, the number of mappings $f$ that satisfy the conditions is exactly $x_{1} x_{2} \cdots x_{m}$.
Thus, the number of all mappings $f$ that satisfy the conditions is
$$
S=\sum_{1} x_{1} x_{2} \cdots x_{m},
$$

where $I=\left\{x_{1}+x_{2}+\cdots+x_{m}=n, x_{i} \in \mathbf{N}_{+}\right\}$.
The value of $S$ is the coefficient of the $x^{n}$ term in the expansion of $f(x)=\left(x+2 x^{2}+3 x^{3}+\cdots\right)^{m}$.
$$
\begin{array}{l}
\text { Also, } f(x)=\left(x+x^{2}+x^{3}+\cdots\right)^{m}\left(1+x+x^{2}+\cdots\right)^{m} \\
=\left(\frac{x}{1-x}\right)^{m}\left(\frac{1}{1-x}\right)^{m}=x^{m}(1-x)^{-2 m},
\end{array}
$$

Then the value of $S$ is the coefficient of the $x^{n-m}$ term in $(1-x)^{-2 m}$.
Thus, $S=\mathrm{C}_{n+m-1}^{n-m}$.