The Supreme Court agreed to consider whether federal law prevents states from counting mail-in ballots received after Election Day. The decision could potentially upend elections in some states.