One can easily see that every finitely generated abelian group has finitely many direct summands up to isomorphism.
Now, assume that $R$ is a ring and $M$ is a finitely generated $R$-module.
Does $M$ have finitely many non-trivial direct summands, up to isomorphism?
Let $R$ be a Dedekind domain with an infinite classgroup. If $I$ is a nonzero ideal of $R$, then $R^2\cong I\oplus I^{-1}$ as $R$-modules, where $I^{-1}$ is the fractional ideal inverse to $I$. As $R$-modules, $I\cong J$ iff $I$ and $J$ are in the same ideal classes. Therefore there are infinitely many direct summands in $R^2$ which are not isomorphic as modules.