Number of group homomorphisms from $D_4$ to $S_{3}$ 
How many group homomorphisms are there from the dihedral group  $D_4$ with eight elements to $S_{3}$?

I am really confuse about this type of problem. How do we find all the group homomorphisms between them, I don't even know how to define the function between them. Can anyone tell me about that?

Let $f:D_4\to S_3$ be a group homomorphism .By First Isomorphism Theorem;
$D_4/\ker f \cong \text{Image }f$.
Possible orders of $\text{Image }f=1,2,3,6$ .Now $|\text{Image }f|\neq 3,6$ 
If $|\text{Image }f|=1\implies f(a)=e \forall a\in D_4$ where $e$ denotes the identity mapping in $S_3$.
If $|\text{Image }f|=2\implies |\ker f|=4$ .
Take  $\text{Image }f=\{e,(12)\}/\{e,(23)\}/\{(e,13)\}$.
Also $D_4$ has three normal subgroups of order $4$ denote them by $T_1,T_2,T_3$.
So we can have $3\times 3$ choices for homomorphisms when $|\text{Image }f|=2$
So we have $9+1=10$ group homomorphisms.
