I can assure anybody that it is not possible for someone to know who voted for which candidate. When you vote in person with a regular ballot, the ballot is pre-folded in such a way that the elector is instructed to return it to facilitate covering the name of the candidate the person has voted for. There are, of course, scrutineers around to make sure the process is followed properly. We have audits of the election that look into ensuring this is done properly.
If you look into voting by special ballot, when we receive the ballot, it is protected by secrecy envelopes. We have to separate the envelopes before we can put in the secrecy envelopes. The outer envelope contains information about the voter. The inner envelope contains no information. They're separated and counted only once that separation has taken place.
There are controls in place and, most importantly, witnesses to the count to make sure these controls are applied.
