Fix the hostCounts calculation.

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>