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)
Now, if the interrogative pronoun is not (part of) the subject, then we need do.
Hope this helped.