4. There are 50 trainees, including bunnies and spiders, attending a dance training camp. Half of the bunny trainees left, and the spider trainees doubled, but the teacher noticed that the number of legs did not increase or decrease. How many bunnies were there originally? (Note: Spiders have 8 legs)

原有小兔 $\qquad$只.

Originally, there were $\qquad$ bunnies.
【Answer】Solution: For every rabbit that leaves, the total number of legs decreases by 4, and for every spider that is added, the total number of legs increases by 8. Therefore, to keep the total number of legs unchanged, the number of rabbits that leave should be twice the number of spiders that are added. If we consider the added spiders as 1 part, then the original number of spiders is also 1 part, the number of rabbits that left is 2 parts, and the original number of rabbits is 4 parts. Thus, the original total number of animals is 5 parts, which is 50 animals, so 1 part has 10 animals. Therefore, the original number of rabbits is $4 \times 10=40$. The answer is 40.