Added Entity class with counter.