Caterpillar Legs and Prolegs
This Monarch Caterpillar has just completed a molting. This shows the three pair of real legs (1) and five pairs of prolegs (2). Prolegs are not real legs.
The anal prolegs(3) are important for the chrysalis process. The other four sets of abdominal(2) prolegs are lost when the caterpillar sheds its skin during the transition, leaving only nubbins on the chrysalis.