According to the 12th Amendment, a majority of "whole number of Electors appointed" is needed to elect a US President or Vice President, or else it's thrown into a contingent election by the House (for President) or Senate (for Vice President).
Under 3 USC 15, when counting electoral votes in the joint session of Congress, an objection to a state's electoral votes can be made by a Representative and a Senator, and then both houses will separately consider the objection. If both houses, acting separately, concurrently decide that the votes are not lawful, those votes are not counted.
In such a case that a state's electoral votes are not counted, does that subtract from the total number of electoral votes of which a majority is needed to elect a President or Vice President? Or is the majority still determined based on the original number of electoral votes (including those not counted)? If the majority is still based on the original number of electoral votes, and the electoral votes that were discarded were needed to put a winning candidate over the half-line, that would mean that once those votes are discarded, no candidate would have a majority, and the election would definitely be thrown to the House and Senate.
Historical precedent doesn't help me here, as the only time electoral votes from a state were thrown out was in the 1872 election, and in that case, it didn't matter -- Grant had a majority of electoral votes based on the original number anyway.