Why don't we use the auxiliary do in the following question:
How many people study there?
Because how many people is the subject of the sentence. If you ask a question about the subject, you don't need do.
Examples: (subjects are italicized)
How many people study here?
Who wants chowder?
Whose child stole the keys?
Now, if the interrogative pronoun is not (part of) the subject, then we need do.
Who did you kill? (who = object)
Who killed you? (who = subject)
Hope this helped.