Fixes to get_num_of_infected_hosts

It now only counts the number of alive hosts that are infected.