This section is from the book "The Constitutional Law Of The United States", by Westel Woodbury Willoughby. Also available from Amazon: Constitutional Law.
With reference to the action of the Houses of Congress, after the selection of electors has been certified to them, the Twelfth Amendment, copying the language of the original provision of the Constitution, declares that "the President of the Senate shall, in the presence of the Senate and House of Representa-tives, open all the certificates, and the votes shall then be counted."
The meaning of the last four words has been shrouded in doubt, and this doubt came very near to leading to serious consequences in 1876-1877. No declaration, it is to be observed, is made as to who shall do the counting, and, therefore, who shall determine what votes shall be counted in case there is question as to their regularity or correctness. In 1876, as is well known, there were enough votes, the validity of which was contested, to determine the election. Upon the part of the Republicans it was claimed that the Vice-President (a Republican) should do the counting. The Democrats, however, asserted that the two Houses voting separately should perform this duty. As the Democrats were then in control of the lower House, and the directed to the president of the Senate; - The president of the Senate shall, in presence of the Senate and House of Representatives, open all the certificates and the votes shall then be counted; - The person having the greatest number of votes for President, shall be the President, if such number be a majority of the whole number of electors appointed; and if no person have such majority, then from the persons having the highest numbers not exceeding three on the list of those voted for as President, the House of Representatives shall choose immediately, by ballot, the President. But in choosing the President, the vote shall be taken by States, the representation from each State having one vote; a quorum for this purpose shall consist of a member or members from two-thirds of the States, and a majority of all the States shall be necessary to a choice. And if the House of Representatives shall not choose a President whenever the right of choice shall devolve upon them, before the fourth day of March next following, then the Vice-President shall act as President, as in the case of death or other constitutional disability of the President. The person having the greatest number of votes as Vice-President shall be the Vice-President, if such number be a majority of the whole number of electors appointed, and if no person have a majority, then from the two highest numbers on the list, the Senate shall choose the Vice-President; a quorum for the purpose shall consist of two-thirds of the whole number of Senators, and a majority of the whole number shall be necessary to a choice. But no person constitutionally ineligible to the office of President shall be eligible to that of Vice-President of the United States.
Republicans of the Senate, this would have meant a deadlock. The impasse was finally broken, as is well known, by the very doubtfully constitutional expedient of a special electoral commission to which all disputed cases should be submitted, the Congress being pledged to be guided by its decisions.
 
Continue to: