Dear Student,
Electronic configuration of Rubidium (Z=37) is 1s2 2s2 2p6 3s2 3p6 4s2 3d10 4p6 5s1
Now in each of the s,p,d,f subshells, only one orbital can have m=0 . So the two electrons residing in orbital will have m=0
From the electronic configuration, it can be seen that upto 4p, all orbitals are fully filled
Therefore, total number of electrons having m=0 till 4p are 16 (2 from each subshell)
5s is singly occupied, this means only 1 electron will have m=0
Hence, total number of electrons having magnetic quantum number as m=0 are 16+1=17