Counter and tests