Naturally, any integer [tex]n[/tex] larger than 127 will return [tex]127\equiv127\mod n[/tex], and of course [tex]127\equiv0\mod127[/tex], so we restrict the possible solutions to [tex]1\le n<127[/tex].
Now,
[tex]127\equiv7\mod n[/tex]
is the same as saying there exists some integer [tex]k[/tex] such that
[tex]127=nk+7[/tex]
We have
[tex]\implies 120=nk[/tex]
which means that any [tex]n[/tex] that satisfies the modular equivalence must be a divisor of 120, of which there are 16: [tex]\{1,2,3,4,5,6,8,10,12,15,20,24,30,40,60,120\}[/tex].
In the cases where the modulus is smaller than the remainder 7, we can see that the equivalence still holds. For instance,
[tex]127=21\cdot6+1\iff127\equiv1\equiv7\mod6[/tex]
(If we're allowing [tex]n=1[/tex], then I see no reason we shouldn't also allow 2, 3, 4, 5, 6.)