|Spoiler Inside: Solution to Puzzle||SelectShow>|
To maximise the number of critters, the numbers should be very close. Otherwise, one could reduce the number of 50-leggers and use that to pump up the number of the fewer-leggers.
Suppose that there are ten 50-legged critters. Then, there could be 9 four-leggers, 8 two-leggers, and 7 0-leggers for a total of 552 legs. In order to have more critters, the number of 50-leggers has to be bumped up by one. This gives 602 legs. In order to decrease the number of legs, both the 0-leggers and 2-leggers must be lowered by one.
This gives 11 50-leggers, 9 4-leggers, 7 2-leggers, and 6 0-leggers for a total of 33 critters. One of the caterpillars just slipped down your neck.