Let $A=\{1,2,3,4\}$   

Let $B= \{a,b\}$   

Let $C= \{ \text{hiking, baseball, hockey} \}$

a) How many onto functions from A to B
$(1,a) (1,b) (2,a) (2,b) (3,a) (3,b) (4,a) (4,b)$ Thus 8.

b) How many onto functions are there from A to C?
This is where I am lost. Would I just count the non-onto functions???