Fixed counter for ifs