what is the total amount of people a high school is allowed to have?

As far as I know, there is no limit on the number of students in a high school. Some cities or states may impose limits -- but I don't personally know of any that do.

Apparently some high schools in the U.S. have more than 5,000 students enrolled.