Start to rework counters. This commit breaks compilation.