n = principal = shell
l = azimuthal = subshell
ml = magnetic quantum number = orientation
ms = spin = which of a pair
the magnetic quantum number refers to the orientation of one of the subshell's orbitals, in which only a pair of electrons exists. It sounds like you're confusing the magnetic (2 electrons max) with the azimuthal number.
*also, ml=2 doesn't necessarily mean l=2=d orbital. Electrons in f orbitals can have ml = 2 as well