Fixed bug in the get live hosts script to return correct number of live hosts