After two years in which Republican states outnumbered Democratic ones, the Democratic Party regained a numerical advantage in 2017.