N is ranked 5th in a class, S is 8th from the last. If T is 6th after N and just in the middle of N and S, then how many students are there in the class?

A 23
B 24
C 25
D 26