C counting repairing