The realm actually consists of nine distinct regions, the remaining two being formally established after the Targaryen conquest, and thus they are not actually considered to be 'kingdoms.' Regardless, all nine provinces were subject to the rule of the Iron Throne.
The name of the realm dates back to the time prior to the War of Conquest, during which seven independent kingdoms existed on the continent. The Six Kingdoms, formerly known as the Seven Kingdoms, is the name given to the realm that controls southern Westeros and its numerous offshore islands, ruled by the King of the Andals and the First Men from the Red Keep in the city of King's Landing. Do you know what the realm is? It's the thousand blades of Aegon's enemies.' ― Petyr Baelish to Varys, referring to the Iron Throne