The magnitude $M$ of the magnetic moments in a real material (like a simple or transition metal) is usually obtained by measuring or computing the static magnetic susceptibility and comparing the result to the Curie susceptibility $\chi_C$ (which describes uncorrelated magnetic moments):
$$
\chi_{C} = \frac{M^2}{3 k_B T} \quad ; \quad M^2 = (g_J \mu_B)^2 \, J(J+1) ~,
$$
where $T$ denotes the temperature, $g_J$ is the gyromagnetic ratio (Landé $g$-factor) which depends on the total angular momentum $J$, $\mu_B$ is the Bohr magneton, and $k_B$ is the Boltzmann constant.
Therefore,
$$
\frac{M}{\mu_B} = g_J \sqrt{J(J+1)}
$$
which is not guaranteed to be an integer, regarding the complicated dependence of the $g$-factor on $J$ and the square root. Even in the simple metals, the lattice structure affects $J$ and the $g$-factor in a non-trivial manner. The simple counting procedure (subtracting the number of spin-up electrons from spin-down electrons) only works as a first (crude) estimate to begin with; actually, in a paramagnetic metallic system (away from magnetic order), one would find that number of up- and down-spins are the same.
For a more detailed discussion, I suggest consulting the following lecture note (esp. $\S$ 2.2 and Tables 1 & 2):
Pavarini, E. “Magnetism: Models and Mechanisms”. in E. Pavarini et al. “Emergent Phenomena in Correlated Matter”, Autumn-School on Correlated Electrons 2013, Forschungszentrum Jülich < http://www.cond-mat.de/events/correl13/talks >.