The justices ruled 7-2 that an Illinois lawmaker can pursue a lawsuit over counting ballots received after Election Day.