127=7 (mod n) means when 127 is divided by n, the division leaves a remainder of 7.
The statement is equivalent to
120=0 (mod n), meaning that n divides 120.
All divisors of 120 will satisfy the statement because 120 divided by a divisor (factor) will leave a remainder of 0.
Factors of 120 are:
n={1,2,3,4,5,6,8,10,12,15,20,24,30,40,60,120}, |n|=16.
You can count how many such values of n there are, and try to check that each one satisfies 127=7 mod n.