This is from Dummit and Foote, exercise 3.4.
Give the number of nonisomophic abelian groups of order 100.
What I did was factor $100$ into invariant factors $$ 1, \; 100$$ $$ 1 ,\; 2 ,\; 50 , \;100$$ $$ 1 ,\; 4 ,\; 25 , \;100$$ $$ 1 ,\; 5 ,\; 20 , \;100$$ $$ 1 ,\; 10 ,\; 10 , \;100$$
This gives me 5 options products of cyclic groups of order 100.
So I get $$ \mathbb{Z}_{100} $$ $$ \mathbb{Z}_{2} \times \mathbb{Z}_{50}$$ $$ \mathbb{Z}_{4} \times \mathbb{Z}_{25}$$ $$ \mathbb{Z}_{5} \times \mathbb{Z}_{20}$$ $$ \mathbb{Z}_{10} \times \mathbb{Z}_{10}.$$
But the answer should be 4, and I have 5 groups here. Comparing with the examples in the book, I think that $ \mathbb{Z}_{100} $ is not an option.
Why is $ \mathbb{Z}_{100} $ not an option? It's abelian, and it has order $100$.
I was thinking maybe cyclic groups only have prime order, but $ \mathbb{Z}_{4} $ is cyclic, abelian, and not of prime order, so that's not true.
You are wrong, $\mathbb Z_{100}$ is an option. But it appears twice in your list: Note that $4$ and $25$ do not share any prime factors, so by the Chinese Remainder Theorem, $$\mathbb Z_4 \times \mathbb Z_{25} \cong \mathbb Z_{100}.$$ As pointed out in the comments, an elementary way to see this is as follows. The element $(1, 1) \in \mathbb Z_4 \times \mathbb Z_{25}$ has order $100$, because if $n$ is a multiple of $4$ and a multiple of $25$, then it is a multiple of $\text{lcm}(4, 25) = 100$. So $(n, n)$ is zero in $\mathbb Z_4 \times \mathbb Z_{25}$ for no $n$ below $100$. Thus, there are at least $100$ elements in this group.