refactor counters/AbstractCounter.as