Then you will have seen the Poll Clerk write down the number of the ballot paper next to your name.
They know what you voted.
I was once employed in the early '80's in a closed shop run by the TGWU. Ballot papers were issued every year. With your name on them. Woe betide you if you voted for the wrong candidate.