It can count if it is proven to be a mistake. But you are right, they have to be proven first, not just counted.
Probably one in a million chance that it was a mistake. In all the years I worked elections, since 1996, I never knew of one that was a mistake. Mostly it was people who moved and or forgot to register to vote. They thought they could just walk in and vote. Our precinct judge was experienced in this and she always managed to calm them down, get them to fill out a provisional ballot, and assured them that this would register them to vote in the very next election. Most went away happy, very few threw a hissy fit. Never heard of any that were counted. Rules are rules and you must be registered about a month before the election in Texas. But that rule seems to be changing in many states. Rumors were that Beto was bussing in people, to get them to vote, each one had a $100 dollar bill in hand. I have no proof, just many rumors.