Using a system like ZCash the government could have citizens register a public address, then 1 token is distributed to each public address, votes work by sending the token to the candidate you vote for, whomever has the highest balance at the end of the election is the electee (this even allows for off ballot candidates, but up to rules). ZCash is designed so that you can't tell the contents of a transaction despite it being immutably on the blockchain