[proofplan]
We use the fundamental theorem of $P$-partitions to decompose all $P$-partitions into disjoint classes indexed by linear extensions. For a fixed linear extension word $\pi$, the bounded condition $\sigma(P)\subseteq [m]$ becomes the requirement that $1\le a_1\le\cdots\le a_n\le m$ and that $a_i<a_{i+1}$ whenever $i$ is a descent of $\pi$. We remove those forced strict inequalities by subtracting the number of previous descents, obtaining an ordinary weakly increasing sequence in $[m-\operatorname{des}(\pi)]$. A direct stars-and-bars count then gives the [binomial coefficient](/page/Binomial%20Coefficient), and summing over $\pi$ gives the formula.
[/proofplan]
[step:Decompose bounded $P$-partitions by linear extension words]
Let $\mathcal A_m$ denote the set of $P$-partitions $\sigma:P\to [m]$. Since $P$ is a nonempty finite poset and $\omega:P\to\{1,\dots,n\}$ is a bijective labeling, the hypotheses of the [Fundamental Theorem of P-Partitions][citetheorem:8137] apply to the labeled poset $(P,\omega)$. Hence the set of all positive-integer-valued $P$-partitions $\sigma:P\to\mathbb N$ is the disjoint union, over linear extensions $\pi=(\pi_1,\dots,\pi_n)\in\mathcal L(P,\omega)$, of the sequences
\begin{align*}
1\le a_1\le \cdots \le a_n
\end{align*}
such that $a_i<a_{i+1}$ whenever $i\in \operatorname{Des}(\pi)$, where
\begin{align*}
\operatorname{Des}(\pi)=\{i\in\{1,\dots,n-1\}:\pi_i>\pi_{i+1}\}
\end{align*}
and
\begin{align*}
a_i=\sigma(\omega^{-1}(\pi_i)).
\end{align*}
The additional condition $\sigma:P\to [m]$ is exactly the condition $a_n\le m$, because the sequence is weakly increasing and every value lies in $\mathbb N$. Therefore $|\mathcal A_m|$ is the sum, over $\pi\in\mathcal L(P,\omega)$, of the number of sequences
\begin{align*}
1\le a_1\le \cdots \le a_n\le m
\end{align*}
with strict inequalities at all positions in $\operatorname{Des}(\pi)$.
[/step]
[step:Remove the forced strict inequalities for one fixed extension]
Fix $\pi=(\pi_1,\dots,\pi_n)\in\mathcal L(P,\omega)$. Define
\begin{align*}
D=\operatorname{Des}(\pi)
\end{align*}
and let
\begin{align*}
d=|D|=\operatorname{des}(\pi).
\end{align*}
For each $i\in\{1,\dots,n\}$, define
\begin{align*}
r_i=|\{j\in D:j<i\}|.
\end{align*}
Thus $r_i$ is the number of forced strict rises before position $i$.
Consider the map from admissible sequences $a=(a_1,\dots,a_n)$ satisfying
\begin{align*}
1\le a_1\le \cdots \le a_n\le m
\end{align*}
and $a_i<a_{i+1}$ for every $i\in D$, to sequences $b=(b_1,\dots,b_n)$ defined by
\begin{align*}
b_i=a_i-r_i.
\end{align*}
For every $i<n$, if $i\notin D$, then $r_{i+1}=r_i$ and $a_i\le a_{i+1}$, so $b_i\le b_{i+1}$. If $i\in D$, then $r_{i+1}=r_i+1$ and $a_i<a_{i+1}$, so $a_i+1\le a_{i+1}$ and again
\begin{align*}
b_i=a_i-r_i\le a_{i+1}-(r_i+1)=b_{i+1}.
\end{align*}
Also $b_1=a_1\ge 1$, and
\begin{align*}
b_n=a_n-r_n=a_n-d\le m-d.
\end{align*}
Hence $b$ is a weakly increasing sequence in $[m-d]$.
Conversely, if $b=(b_1,\dots,b_n)$ is a weakly increasing sequence satisfying
\begin{align*}
1\le b_1\le \cdots \le b_n\le m-d,
\end{align*}
define
\begin{align*}
a_i=b_i+r_i.
\end{align*}
Then $a_1\ge 1$ and
\begin{align*}
a_n=b_n+d\le m.
\end{align*}
If $i\notin D$, then $r_{i+1}=r_i$, so $a_i\le a_{i+1}$. If $i\in D$, then $r_{i+1}=r_i+1$, so
\begin{align*}
a_{i+1}=b_{i+1}+r_i+1\ge b_i+r_i+1=a_i+1,
\end{align*}
and therefore $a_i<a_{i+1}$. These two constructions are inverse to each other, so admissible $a$-sequences for $\pi$ are in bijection with weakly increasing $n$-term sequences in $[m-d]$.
[guided]
Fix one linear extension word $\pi=(\pi_1,\dots,\pi_n)$. The fundamental theorem has reduced the problem to counting sequences
\begin{align*}
1\le a_1\le \cdots \le a_n\le m
\end{align*}
with strict inequalities required at every descent position of $\pi$. Define the descent set
\begin{align*}
D=\operatorname{Des}(\pi)=\{i\in\{1,\dots,n-1\}:\pi_i>\pi_{i+1}\}
\end{align*}
and put $d=|D|$. The difficulty is that a sequence with some forced strict inequalities is not counted directly by the usual weak-sequence count. We convert it into an entirely weak sequence by subtracting one unit for each strict rise that has already been forced.
For each index $i\in\{1,\dots,n\}$, define
\begin{align*}
r_i=|\{j\in D:j<i\}|.
\end{align*}
This is the number of descent positions before $i$. Given an admissible sequence $a=(a_1,\dots,a_n)$, define
\begin{align*}
b_i=a_i-r_i.
\end{align*}
We check that $b=(b_1,\dots,b_n)$ is weakly increasing. If $i\notin D$, then no new forced strict rise occurs between $i$ and $i+1$, so $r_{i+1}=r_i$. Since $a_i\le a_{i+1}$, we get $b_i\le b_{i+1}$. If $i\in D$, then there is a forced strict rise, so $a_i<a_{i+1}$. Because the $a_i$ are integers, this means $a_i+1\le a_{i+1}$. Also $r_{i+1}=r_i+1$, and therefore
\begin{align*}
b_i=a_i-r_i\le a_{i+1}-(r_i+1)=b_{i+1}.
\end{align*}
Thus the strict inequalities have become weak inequalities after the subtraction.
The bounds are also transformed correctly. Since $r_1=0$, we have $b_1=a_1\ge 1$. Since every descent position is before $n$, we have $r_n=d$, and hence
\begin{align*}
b_n=a_n-d\le m-d.
\end{align*}
Thus $b$ is a weakly increasing $n$-term sequence in $[m-d]$.
Now we reverse the construction. Start with a weakly increasing sequence
\begin{align*}
1\le b_1\le \cdots \le b_n\le m-d
\end{align*}
and define
\begin{align*}
a_i=b_i+r_i.
\end{align*}
Then $a_1=b_1\ge 1$ and
\begin{align*}
a_n=b_n+d\le m.
\end{align*}
If $i\notin D$, then $r_{i+1}=r_i$, so $a_i\le a_{i+1}$. If $i\in D$, then $r_{i+1}=r_i+1$, and weak monotonicity of $b$ gives
\begin{align*}
a_{i+1}=b_{i+1}+r_i+1\ge b_i+r_i+1=a_i+1.
\end{align*}
Hence $a_i<a_{i+1}$ at every descent position. The formulas $b_i=a_i-r_i$ and $a_i=b_i+r_i$ are inverse formulas, so this is a bijection.
[/guided]
[/step]
[step:Count weakly increasing bounded sequences by stars and bars]
Let $M=m-d$. If $M\le 0$, then no integer can satisfy $1\le b_1\le\cdots\le b_n\le M$, and by the stated convention
\begin{align*}
\binom{M+n-1}{n}=0.
\end{align*}
Assume now that $M\ge 1$. A weakly increasing sequence
\begin{align*}
1\le b_1\le \cdots \le b_n\le M
\end{align*}
is equivalent to choosing nonnegative integers $c_1,\dots,c_M$ such that $c_j$ is the number of indices $i$ with $b_i=j$. These multiplicities satisfy
\begin{align*}
c_1+\cdots+c_M=n.
\end{align*}
Conversely, any $M$-tuple $(c_1,\dots,c_M)$ of nonnegative integers with this sum determines the weakly increasing sequence containing $c_1$ copies of $1$, then $c_2$ copies of $2$, and so on through $c_M$ copies of $M$.
The number of such $M$-tuples is the number of ways to place $n$ indistinguishable objects into $M$ ordered boxes, namely
\begin{align*}
\binom{n+M-1}{n}.
\end{align*}
Substituting $M=m-d$ gives
\begin{align*}
\binom{m+n-1-d}{n}.
\end{align*}
Therefore the number of admissible sequences associated to the fixed linear extension $\pi$ is
\begin{align*}
\binom{m+n-1-\operatorname{des}(\pi)}{n}.
\end{align*}
[/step]
[step:Sum the fixed-extension counts over all linear extensions]
The decomposition from the fundamental theorem of $P$-partitions is disjoint, so the total number of bounded $P$-partitions is the sum of the fixed-extension counts. Hence
\begin{align*}
|\mathcal A_m|=\sum_{\pi\in\mathcal L(P,\omega)} \binom{m+n-1-\operatorname{des}(\pi)}{n}.
\end{align*}
Since $\mathcal A_m$ is exactly the set of $P$-partitions $\sigma:P\to [m]$, this is the desired formula.
[/step]