Refactoring Attributes counter.
Correcting tests