The Gallian Abstract Algebra text has a number of exercises of the form 'Determine the number of homomorphisms between two groups $G$ and $H$'. It is pointed out that, in the case of a cyclic $G$, determining the image of a generator of $G$ under a homomorphism $\phi$ suffices to specify the entire mapping, since $\phi(g^n)=\phi(g)^n$ for any $g \in G$. Hence determining the number of homomorphisms simplifies to counting generators of $H$ and applying Lagrange's Theorem. Are there any other useful properties of homomorphisms that can be used as tricks for this type of problem or just general strategies when counting maps between $\textbf{non-cyclic groups}$? Two examples I see in the text exercises are:
(1): Determine all homomorphisms from $S_3$ to $G$, where $G$ is Abelian.
(2): Determine the number of homomorphisms from $Z_p\oplus Z_p\to Z_p$, where $p$ is prime ($Z_p$ being a subgroup of the additive integers).
Thanks in advance!