Calculating the number of hosts