Five symbolizes grace and favor. Seven symbolizes perfection, completeness and abundance. Ten symbolizes obedience, completeness of order. Twelve symbolizes government, authority. When the beast is described as having seven heads, it speaks of completion or fullness of the wickedness and evil.
Heads refer to leadership, to governments and to ruling.
When we refer to the head of an organization or a group, we're speaking of the leadership. So seven heads would refer to fullness of governments. The headship of the governments is upon the beast. The ruling governments are right in the midst of the beastly system. In man's eyes, some governments are good and some evil.