the backpacks are in the bus, therefore the legs are also in the bus.
Bus driver was never mentioned, bus could be at a stop/parked.
But the wording said "how many legs on the bus" and failed to mention the boys or driver. Seems like you need that information for an accurate assessment.