A system based on total votes counted for the entire nation is vulnerable by rigging performed by election officials in as little as a single location.
As an example, currently if a heavily Democratic Party controlled State like CA has election officials who rigg things to add votes to Hillary, they only affect the electoral college results from CA, which being heavily Democratic already they've already got. If switched to a system of total votes, they could produce extra "votes" for Hillary where GOP poll watchers didn't show up (because the local race isn't competitive) and seriously affect the overall election. If you want a reverse example, think Diabold in a southern state and the potential ability to add votes when another party controls things.
So one of the reasons for the current system is to limit and constrain issues in a particularly partisan location to that location, rather than making it a nationwide issue. Another reason (the original one for the electoral college) is that different parts of the country have different interests, values and goals, even beyond the typical urban/rural divide. Forcing candidates to win in a lot of places by what may be a smaller amount, rather then simply winning a few places by a ton of votes and ignoring the rest improves their ability to represent the whole country, rather than one single partisan slice popular regionally.