There are four quantum numbers: n, l, ml and ms. When the orbital is 4d, the 4 is corresponding to n. Thus, n=4. Then, the d corresponds to l = 2. Now, to find the value for ml, take the values of -l to +l. Therefore,
ml = -2, -1, 0, 1, 2
Then,ms could only be either +1 or -1.