But the president isn't supposed to be decided by the number of states. It's supposed to be decided by the people. Often the people pick a Democrat, but the Republican still wins because we have a system that favors state lines.
And the Democrats controlled most states before the party switch. Really, the system favors Conservatives, which are currently the Republicans.
The president is supposed to be decided by the electoral college. The Constitution never included (and still does not) any mention of the people having any role in this process. But the people do essentially decide the presidency by determining which candidate receives their state's electoral votes. It is not decided by who wins the most states but a majority of electoral votes.The system insures more widespread support.
When you say "often the people pick a Democrat, but the Republican still wins...." How often does that happen?