Anyone attending a polling station has a duty to maintain the secrecy of the ballot.1
In particular, the following information must not be disclosed:
the name or electoral number of who has or has not voted
the number or other unique identifying mark on the ballot paper
Anyone attending a polling station must also not try to ascertain how a voter has voted or who they are about to vote for.
A polling agent can mark off on their copy of the register of electors those voters who have applied for a ballot paper. If the polling agent leaves the polling station during the hours of polling, they will need to leave the marked copy of the register in the polling station to ensure that secrecy requirements are not breached.
Any person found guilty of breaching the secrecy requirements can face an unlimited fine, or may be imprisoned for up to six months.
For more information read the polling station secrecy requirements.