In the "Update" (the day after the Question itself was posted), the OP mentions a recursion for counting the partitions of $n$ into $k$ distinct parts, each part at most $M$:
$$ p_k(\leq M, \mathcal{D},n) =
p_{k-1}(\leq M-1, \mathcal{D},n-k) +
p_k(\leq M-1, \mathcal{D},n-k) $$
and asks "How can I prove this?".
To see this, separate the required partitions on the basis of whether $1$ appears as a summand. If it does, then subtracting $1$ from each summand produces a partition of $n-k$ with exactly $k-1$ distinct parts (since the original summand $1$ disappears), each part at most $M-1$. These partitions are counted by the first term on the right-hand side of the recursion. Otherwise the summand $1$ does not appear, and subtracting $1$ from each part resulting in a partition of $n-k$ with exactly $k$ distinct parts, each part at most $M-1$. These cases are counted by the second term.
Note that a partition of $n$ with $k$ distinct parts exists if and only if $n \ge \binom{k+1}{2}$, because the ascending summands $m_1 + \ldots + m_k = n$ must satisfy $m_i \ge i$. If $n = \binom{k+1}{2}$, then there is just one such partition with $k$ distinct parts, the largest of which is $k$. Repeated application of the recursion will culminate with terms which we can evaluate "by inspection" as either zero or one.
By itself this recursion doesn't seem to give us an especially attractive way of evaluating $p_k(\leq M, \mathcal{D},n)$. Like the recursion for Fibonacci numbers, as a top-down method it suffers from recalculating terms multiple times (giving exponential complexity), so we would be better off working with it as a bottom-up method (giving polynomial complexity).
Better for large parameters is to close the circle with the ideas presented by @NikosM. by showing how the evaluation of $p_k(\leq M, \mathcal{D},n)$ can be reduced to counting restricted partitions without requiring distinct summands.
Prop. Suppose that $n \gt \binom{k+1}{2}$. Then the following are equal:
$(i)$ the number of partitions of $n$ into exactly $k$ distinct parts, each part at most $M$, i.e. $p_k(\leq M, \mathcal{D},n)$
$(ii)$ the number of partitions of $n - \binom{k}{2}$ into exactly $k$ parts, each part at most $M$
$(iii)$ the number of partitions of $n - \binom{k+1}{2}$ into at most $k$ parts, each part at most $M$
Sketch of proof: Once we know the ordered summands of partitions in $(i)$ satisfy $m_i \ge i$, it is easy to visualize their equivalents in $(ii)$ and $(iii)$ by Young tableaux, also called Ferrers diagrams. We remove a "base triangle" of dots corresponding to the first $i$ dots in the $i$th summand (since $m_i \ge i$) to get case $(iii)$, and remove one fewer dot in each summand to preserve exactly $k$ summands in case $(ii)$. These constructions are reversible, and the counts are equal.
Remark 1 If $n \le \binom{k+1}{2}$, $p_k(\leq M, \mathcal{D},n)=1$ if $n=\binom{k+1}{2}$ and $k \le M$ and otherwise $p_k(\leq M, \mathcal{D},n)=0$.
Remark 2 For fixed $k,n$, suppose $M_0 = n - \binom{k}{2} \gt 0$. Then for all $M \ge M_0$, $p_k(\leq M, \mathcal{D},n) = p_k(\leq M_0, \mathcal{D},n)$. That is, further increasing the upper bound $M$ on the size of parts will not yield additional partitions of $n$ with exactly $k$ distinct parts.
Recommended Reading
Andrews, George E. The Theory of Partitions (Cambridge University Press, 1998)
A modern classic for theory of integer partitions, reviewed by Richard Askey in BAMS.
Here is a simple combinatorial proof that does not use hyperplanes.
The number of vectors in $\mathbb F_p^n$ whose entries are pairwise different is $p(p-1)(p-2)\cdots(p-n+1)$. Given such a vector, $\def\x{{\bf x}}\x$, let $f(\x)$ be the vector obtained by adding one to each entry. As long as $n$ and $p$ are corprime, which occurs whenever $p>n$, the sums of the entries of the vectors $$\x,f(\x),f^2(\x),\dots,f^{p-1}(\x)$$ will each have a different remainder modulo $p$. Therefore, exactly one of them will have a sum whose remainder is zero. Since the set of all vectors with pairwise different entries are partitioned into groups like this, the number of such vectors whose sum congruent to zero is $1/p$ times the total number, which is $(p-1)(p-2)\dots(p-n+1)$.
Best Answer
Introducing the short-hand notation $(z)_p=(1-z)(1-z^2)\cdots (1-z^p)$, we want to show for $k,l\geq 0$ \begin{align*} P^{(\leq l, \{1,\ldots,k\})}(z)=\frac{(z)_{l+k}}{(z)_l(z)_k}\tag{2} \end{align*}
We want to show that the right hand side of (2) fulfils the same recurrence relation as (4). We introduce the short-hand notation $Q^{(l,k)}(z)$ and define \begin{align*} Q^{(l,k)}(z):=\frac{(z)_{l+k}}{(z)_l(z)_k} \end{align*}
Note: This answer is more or less verbatim Theorem 3.1 of The Theory of Partitions by G.E. Andrews.