Centipedes belong to the class Chilopoda in the arthropods phylum. The name “centipede” comes from the Latin prefix “centi-“, meaning “hundred,” and “pes, pedis,” meaning “foot.” This might suggest that centipedes have 100 legs, but this is not always the case.
Centipedes always have an odd number of pairs of legs, and the total number of legs can vary widely from species to species. When people think of centipedes, they probably think of the most common body type of centipedes which would include between 15 and 30 pairs of legs (so, 30-60 legs in total), but some species of centipedes have been found with as few as 30 legs and as many as hundreds of legs, for example Geophilomorpha (soil centipedes). There are reports that one species has 191 pairs of legs, but I did not find the exact species. So, to answer your question, centipedes can have anywhere from maybe 30 to over 300 legs, depending on the species.