TITLE: Number of non decreasing sequences of length $M$
QUESTION [7 upvotes]: How many non decreasing sequences are there of length $M$, provided the number in the sequences are allowed from $1,2,3,...,N$?

REPLY [6 votes]: Elaborating user2255279's answer:
For $k=1,2,3 \cdots N$, let $k$ appear $n_k$ number of times in a particular allowed $M$ length sequence.
Since we want the $M$ length sequence to be non decreasing, $n_1$ number of $1$s have to appear at the start of the sequence, followed by $n_2$ number of $2$s and so on. Thus the set of numbers $n_k$ uniquely determines an allowed sequence.
So it remains to count the number of sets of allowed $n_k$s. The only constraint is the length of the sequence is $M$.
Therefore the number of non-negative integer solutions to $n_1 + n_2 + \cdots + n_N = M$ is the answer to your question. By stars and bars, the answer is $\binom{N+M-1}{M}$.
Abhra Abir Kundu's answer matches the above if you write $\dbinom{M-1}{r-1}$ as $\dbinom{M-1}{M - r}$ and then use Vandermonde's identity.
Cheers!