You can use homomorphic encryption or mixnets to prove that:
1) all valid votes were counted
2) no invalid votes were added
3) the totals for each candidate is correct
And you can do that without providing proof of who any particular voter voted for. A few such systems:
https://en.wikipedia.org/wiki/Helios_Voting
Authentication to these systems is another issue - there are problems with mailing people credentials (what if they discard them in the trash?).
https://www.cbc.ca/news/canada/ontario-municipal-elections-o...
Estonia (a major adopter of online voting) solves this with the national identity card, which essentially is government issued public/private keys.
https://en.wikipedia.org/wiki/Estonian_identity_card
Lots of cyber risks with the use of online voting though, especially in jurisdictions without standards/certification. I outline many in my thesis which explores the risks to online elections in Ontario, Canada (one of the largest and longest-running users of online voting in the world)
https://uwo.scholaris.ca/items/705a25de-f5df-4f2d-a2c1-a07e9...