allows using different type of Counter
removed unecessary #ifdef