Created new PigCounter class

Extracted logic from GridPainter to count pigs and placed into a
separate class