These kind of pathologies hurt my brain... help me out:

Formally a function F from A to B is a subset of AxB such that for any a in A there exists a unique b in B with (a,b) in F.

How many functions are there from the empty set to the empty set? Now from the definition, "for any a in A" fails already, so everything vacuously follows. Since the only subset of the Cartesian product is the empty set, there is only one function. Is this correct? Is it actually a function or just a relation?

What if A is empty and B is not? Following the steps again, there is only one function (relation)?

What if A is non-empty and B is empty? Then there is no function at all? But the empty set is still a subset of the Cartesian product; is it just a relation then?