The number of total surjective functions from $X$ to $Y$ is known to be $T = y!\left\{{x \atop y}\right\}$, with $|X|=x, |Y|=y$.
However, I am interested in the number $P$ of partial surjective functions, that is, elements of $X$ do not necessarily map to an element of $Y$.
An approach I was thinking about was that you can map each partial function $f:X \to Y$ to a total function $f': X \to Y \cup \{\epsilon\}$, where $\forall x \in X \setminus \operatorname{dom}(f), f'(x) = \epsilon$. That is, extending the domain of the partial function such that elements undefined through $f$ map to a special element in $f'$.
Using this, we can say: $$P = (y+1)!\left\{{x \atop y+1}\right\} + T.$$
The added $T$ is to count the partial functions that happen to be total. The first term does not count them since $\left\{{x \atop y+1}\right\}$ counts the number of ways to partition a set of $x$ objects into $y+1$ non-empty subsets. Interrestingly enough, by rearranging a bit, we also have:
$$P = y!\left\{{x+1 \atop y+1}\right\}.$$
Is the reasoning correct? Is there a more elegant approach?