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?

Hint: The dihedral group with eight elements is the set of symmetries of a polygon with 4 vertices, symbolized $D_4$. The group is generated by a rotation $r$ of order 4, and a reflection, $s$ of order 2. That is, $D_4=\langle r, s\rangle$. So any group homomorphism from $D_4$ into $S_3$ must assign $r$ to an element whose order is divisible by 4, and $s$ to an element whose order is divisible by 2. These selections will determine the homomorphism completely.
So now the question becomes - how many elements of order 1,2, or 4 are there in $S_3$?
