In general, looking carefully at the units tends to help me understand physics. (BTW, solid state physics was the hardest subject for me.)
Anyway, we have this:
[tex]n = 0.6022 \times 10^{24} \frac{Z \rho_m}{A}[/tex]
Physicists have a nasty habit of leaving out units when they write equations in textbooks. That didn't stop the physicists in my EE department from marking my grade down when I forgot to put units on my test answers. YOU'LL GET YOURS ONE DAY PHYSICISTS!
Let's add the units:
[tex]n (#electrons) = 0.6022 \times 10^{24} \frac{#atoms}{mole} \frac{Z \frac{#electrons}{atoms}\rho_m \frac{mass}{cm^3}}{A \frac{mass}{mole}}[/tex]
You can see how the units cancel now. Does that help?