The number of animals is 50, I arrived at this conclusion by the reasoning:

The number has to be descently small, because the number of cats, minus 5, will be half that of the dogs. So, I tried 30 dogs and 20 cats. 20 - 5 is 15, half of 30, and then 30 - 25 is one third of fifteen.

Does this help? I didn't sleep well last night, so I'm brainfried, or I would have tried a bit more to pull an equation out of the problem, though it would seem to be posible. Maybe tomorrow...... *yawns*

What was the graphic for the second part? it didn't load properly.