Counter class written and tested.