EU Referendum: How will result of the vote unfold?

The campaigns on each side of the UK's membership of the European Union have been running for months.

Next Thursday voters will pass their judgement. But when will we know who's won?

Ros Atkins explains the procedure.