I was a ballot counter on democratic, and to my best knowledge, fair elections.
The main cause, why is it impossible, that normally all the parties with contradicting interests must delegate ballot counters to all voting place. They watched everything what I did and I watched them.
Before that, I was prepared by my delegating party, what should I watch, and I also had a phone number to call if I see any problematic. I am sure, also they had.
All the ballots must be counted by everybody, by hand. To make a ballot invalid, we (I + at least someone from an opposite party) must agree that it is invalid. If there is a disagreement, we can argue and doing it well, maybe we can win 2-3 votes in an average sized voting place (about 10000 ballots). But it does not worth it, except rare cases (like CaliforniaFlorida Bush vs. Gore).
If we see that the other side does anything problematic, then first we must say stop, then second, we have a phone number from our delegating party, who to call. The end result will be a record about the problem, and in the last resort, even a court can decide if the ballot was valid of not. But that is nearly unheard, because such events are too rare, and some "local committee for elections" or similar before that makes decision with this meaning: "It does not matter if that ballot was valid or not, because it is not enough to change the result".
So the answer is that I could not cheat anything significantly because everything, what I do, is closely watched by a guy exactly with the opposite goal. I can not miscount anything, because guys with opposite interests are watching me (and I watch them), and second, because all the ballots are counted multiple times by opposite parties.
The best what could be done, to win about 0.001% in the problematic cases where a ballot is on the border of the validity, but even that is... problematic (if the opposite party detects what I am trying do, they will do the same, and also they start to complain on everything - no one wants this).