There are 5 animals going towards the river.
The rabbit saw the elephants while on its way, but because the elephants aren't walking towards the river, they don't count in this equation. +1
The rabbit saw 2 monkeys, and each monkey had a parrot in their hands. The monkeys and parrots count because they were walking towards the river. +4
1 rabbit + 2 monkeys + 2 parrots = 5 animals.