On finding the number of homomorphisms from $G$ to $G_1\oplus \cdots \oplus G_n$ How shall I establish that the number of homomorphisms from the group $G$ to $G_1\oplus G_2\oplus \cdots G_n$ is same as $h_1h_2\cdots h_n$ where $h_i$ is the number of homomorphisms from $G$ to $G_i$ ? Here $G, G_1, G_2, \cdots, G_n$ are all groups.

A finite direct sum is a product. By the universal property of products, a homomorphism $G \to G_1 \times \dots \times G_n$ is uniquely determined by its projections $G \to G_i$ and vice-versa. In other words, there is a bijection $$\hom(G, G_1 \times \dots \times G_n) \cong \hom(G, G_1) \times \dots \times \hom(G, G_n)$$
and the cardinality of this last set is $h_1 \dots h_n$.
