Centipedes have one pair of legs per body segment. A typical house centipede has 15 pairs of legs. Centipede legs are thin, fragile and subject to loss in encounters with predators or other mishaps.
Centipedes groom their legs several times per day by bringing them in contact with the head. How does a centipede keep track? They groom the legs in sequence from front to back. If a leg is missing the centipede completes the grooming sequence as if the leg were still present. Perhaps this is similar reports of phantom sensations by humans who have lost limbs.
Centipede limbs are not lost forever. Centipedes can molt as adults, and can regenerate lost limbs. Often a regenerated limb is smaller or underdeveloped.