Lemma. Cardinality of the set of partial functions [00KE]

For all finite sets A and B, we have \mathord {\#}{\mathopen {}\left (A\mathbin {\rightharpoonup } B\right )\mathclose {}}={\mathopen {}\left (\mathord {\#}{B}+1\right )\mathclose {}}^{\mathord {\#}{A}}, recalling that \mathord {\#}{S} is the cardinality of a set S.