Added TypesafeCounter class as preparation for partitioned shared counter tests