[Math] $A$ and $B$ are finite sets. How many Partial Functions exist between them

functions

so I have following question

$A$ and $B$ are finite sets

How many Partial Functions exist between them ?

$f:A\to B$

Can someone give me a solution/hint/website where they may explain me a solution.
Since unfortunately I can't think of a good solution for this one.

Best Answer

Another solution is to identify a partial function $f$ from $A$ to $B$ with a total function from $A$ to the disjoint union $B \sqcup \{\ast\}$ (send every element not in the domain of $f$ to $\ast$). The number of such total functions is $(|B| +1)^{|A|}$, just as in Bernard's solution.