Update infect.pl

Adjusted unit counting system. Not 100% fixed. Currently, there's a chance it wont be accurate on its count of units at the end. Normally happens at smaller grid sizes.