Magnetic quantum number ml have values from -l to +l and total of 2l+1 values.
For n=4, possible values of l and ml are:
ml=0 for l=0; total ml values =1
ml=−1,0,1 for l=1; total ml values =3
ml=−2,−1,0,1,2 for l=2; total ml values =5
ml=−3,−2,−1,0,1,2,3 for l=3; total ml values =7
Total number of orbitals = total values of ml
for n=4,
∴1+3+5+7=16 orbitals
Each orbital can occupy a maximum of two-electron
Number of electrons =2×16=32
spin quantum number for one electron in an orbital is mS=+12 and other electron has mS=−12
Thus electrons with mS=−12 will be 12×32=16