I am looking at the relation between the first homology group $H_1(X)$ and the fundamental group $\pi_1(X)$. Given a path-connected space $X$, I have some grasp of what $\pi_1(X)$ should be intuitively (as far as I am aware, it can be informally be thought of as the number of 'holes' in the space). Thus, it would be a very easy to deduce $H_1(X)$ if I knew that taking the abelianization $\pi_1(X)_{ab}$ does not change the rank of the fundamental group.
As an example, $S^1 \vee S^1$ has two 'holes', and so intuitively one might think that $\pi_1(X) \cong \mathbb{Z} \oplus \mathbb{Z}$. It turns out also that $H_1(X) \cong \mathbb{Z} \oplus \mathbb{Z}$, so they have the same rank.
My question is, does this always hold? Is there some example where the rank of $H_1(X)$ and $\pi_1(X)$ are different?