Which rule of law? The electoral college?Also, remember, all the voters for Hillary Clinton, which OUTNUMBERS the one for Trump by at least 2M, should be taken into account as well if you are not going to ignore the rule of law.
Total popular vote means absolutely nothing. It means as much as which team had the most pitches in the World Series, or which team ran the most yards in the Super Bowl. It means as much as which team used the fewest tires in the Indy 500. If the Indy 500 winner was based on tire usage, the teams would have an entirely different strategy and the outcome of the race would be completely different (speed, order of finish, when they take pit stops, etc). And so it is with the Presidential election. If popular vote meant anything at all, the candidates would run completely different campaigns. There is no way to predict who in past elections would have won under different rules.