
OK. Here's another page;
http://lotr.wikia.com/wiki/Battle_of_Five_Armies

lOok at it this way. We have the men, who did not plan to get involved in the battle; they wanted their gold from Thorin. We had the Elves, who were after their share of the treasure (specifically some jewels). They didn't plan to get involved in that specific battle. We had the Dwarves, who did plan to defend Erebor. That's three. We can all agree on that, right?
THen we had Azog's army, which he entirely planned BOTH parts, even if they arrived at different times. Besides, based on the image you quoted, there should have been a massive number of wargs involved. I don't recall seeing very many wargs in the movie. Then we had a great number of eagles that swept in a destroyed the orc army, siding with the elves, men, and dwarves.
That would give us an army of
Orcs
Dwarves
Men
Eagles
Elves
5 races, 5 armies.