How many prince-electors were involved in the election of the Holy Roman emperor until the 17th century?
From the 13th century, there were seven prince-electors (or sometimes just referred to as electors) that made up the body of the Council of Electors. These electors voted who would be "King of the Romans", their selection would in turn be elevated to Holy Roman Emperor. Over time the election process changed. Starting in 1440 and continuing through to the end of the empire in 1806 all elected Emperors came from the House of Hapsburg (also known as the House of Austria), or from a related blood line or related through marriage. Essentially the electors followed the House of Hapsburg line of succession for choosing the next Emperor.
Changes to the prince-electors occurred in the 17th century, when the privilege was transferred from the Count of Palatine to the Duke of Bavaria. In 1692 the Duke of Calenberg became a prince-elector (the state was commonly called Hanover after the duchy's capital). Additional electors were added in the 19th century during the Napoleonic wars shortly before the empire was dissolved.
The seven original electors included three spiritual or ecclesiastical members, the Archbishops of Trier, Cologne and Mainz. Four secular electors were the King of Bohemia, Count Palatine of the Rhine, Duke of Saxony and Margrave of Brandenburg.