Centipedes have a varying number of legs, typically ranging from 15 to 177 pairs, depending on the species.