Fixed counter subroutine