The current question is
In this case, we consider population of more than 1,000,000 to be over- populated and less than 5,000 to be under-populated.
The band of the query is 5000 to 1000000. The first answer in the detailed answer section is defining a band of 5001 to 999999, so if their had been data at 5000 and 1000000 the query would have come back with the wrong answer.
You need to add an $lte and $gte to the first answer.
Again the question could be better phrased…
We consider the ideal population to be between 5000 and 1000000 (inclusive), how many zips match this criteria.