Calculation of the number of residents on the given territory