Election FAQ: Telling Outside Polling Stations
Q: Why do people ask for my polling number outside the poling station?
A: In short: to stop the Party's bothering you later in the day asking you to vote when you have already done so.
In more detail: all candidates in an election get a copy of the electoral roll - all people eligible to vote in that election.
A candidate's campaign can then use that list to create their own list (from canvassing, speaking to people and sometimes other data) of those they want to remind to vote on polling day: probably the voter they feel most likely to vote for them!
By taking the numbers of those turning up to vote at the polling station (legal and allowed specifically by law) the candidates can then simply crosscheck their list and cross off those who have voted, to concentrate their time on the people on their target list who haven't yet voted. It gives the candidates no information whatsoever on HOW a person voted - just that they have been to the polling station (information which, again by law, the Council makes available after polling day on the official "marked registers").
Giving your number (or name and address) to the people sat outside the polling station therefore just tells candidates that you have voted, and should mean they don't try and contact you later in the day to remind you to vote: it's to YOUR benefit (unless you like having your door knocked on to remind you to do something you've already done!).