The best way would be to print a vote confirmation receipt, numbered like the lottery tickets with proof of who you, as an unknown voter, voted for. If it can be done nation wide for lottery, it can be done for Voting. If results are challenged, people can bring forth their proof.
Also, you could track your number to make sure it was counted the way it was entered and printed. Easy-peasy.