Have encoder counter class working