The Electoral Count Act as signed on February 3rd, 1887 by Grover Cleveland during the Cleveland Administration.(National Archives) The act’s purpose is to regulate the counting of the votes for the President and Vice President and to help with questions surrounding said count.(Library of Congress)

Quote

An act to fix the day for the meeting of the electors of President and Vice-President, and to provide for and regulate the counting of the votes for President and Vice-President, and the decision of questions arising thereon.(Library of Congress)

This legislation was likely passed due to the 1876 United States presidential election and the issues that occurred with electors being legitimate and counted.(Mischiefs of Faction, Koger) (Schickler, Bimes, Mickey)

Quote

The 1877 filibuster of the electoral vote count exposed a flaw in the presidential election process. Over the next decade, Congress debated how best to fix it, with Democrats arguing for deference to states (including southern states increasingly dominated by white Democrats suppressing black Republican voters) while Republicans sought federal oversight of state outcomes. The Electoral Count Act of 1887 was the result: it provides a presumption of legitimacy to states that have a legal process for guaranteeing election results set in place before election day, while allowing members of Congress to challenge a state’s votes if a House member and senator make the challenge in writing. If a valid challenge is filed, the joint session goes into recess while the two chambers meet separately to discuss the challenge for up to two hours, followed by a simple majority vote. Both chambers must vote to sustain a challenge. The time limit prevents a filibuster of the vote.(Mischiefs of Faction, Koger)

Quote

The legislative history of the Electoral Count Act dates back to the initial efforts by Congress to respond to the Hayes-Tilden debacle of 1876.(Schickler, Bimes, Mickey)