Image caption Thousands of count assistants will play a key role in the electoral process across the country

When the votes have been cast and the polling stations are shut, it won't just be the politicians who are in for a sleepless night. The people responsible for counting - and recounting - the ballot papers will be steeling themselves for a night of intense pressure and concentration.

When the polls close at 22:00 BST, the work begins.

Millions of votes will be taken in boxes from polling stations and transported to leisure centres, town halls, schools and other venues where their presence is eagerly awaited by hopeful candidates and tables of staff ready to count.

"For me, it felt like it was the most important legal thing you could ever do. More than signing up for a mortgage or getting married," said count assistant Lizzie Ridout.

Image caption Lizzie Ridout said her first time counting votes on election night was "very nerve-wracking"

She has worked on election night for the last seven years at Tendring District Council in Essex, alongside her role as a research and projects officer for the authority.

Her first time at the tables was "very nerve-wracking" and said there was a "huge feeling of responsibility" about getting it right, she said.

"You can't just think 'Oh, it'll be fine, it doesn't add up so we'll make it add up', it's a legal and proper process happening across the country."

Clacton's count, where Mrs Ridout will be spending her evening this time around, is taking place at the town's leisure centre.

She and the other count assistants will be arriving at about 21:30 BST and when ballot boxes start arriving they will do a preliminary count to make sure the numbers tally up with how many ballot papers were issued.

Once that is done, the counters are given the OK to start sorting the votes - and that is when Mrs Ridout and her colleagues might spot some slightly more unusual ballot papers.

Image caption Counters for the Tendring District Council area will work in Clacton's leisure centre overnight

"You do get some very strange things written on ballot papers - letters, sometimes, or people's thoughts," she said.

"They do make us smile. They call them doubtful papers, and we get guidance from the Electoral Commission as to what we can accept - a tick, or a cross, or something to indicate a preference.

"But if they've put another mark somewhere else, or if they've put their name and address and identified themselves, that would have to go as a doubtful paper."

Once the votes are sorted into main parties and others, it is time to start the count.

"You're being watched the whole time," said Mrs Ridout, 39. "There's quite a lot of pressure. The first time you're a bit shaky, thinking 'Oh my god, I'm being looked at' - but you get used to it."

Image caption Sometimes "very strange things" are written on people's ballot papers, Mrs Ridout said

Count me in

Counters are often current or former council employees, but some local authorities advertise externally for staff

There are Electoral Commission rules about who can and cannot perform the role of counting assistant - you cannot, for example, have worked in support of a political party or candidate at the election

A conviction of an offence under electoral legislation would also rule you out

You have to be at least 16 years old

You must agree and adhere to the terms of the "statement of secrecy"

Count assistants also need to be fully literate and numerate

Image caption Parliamentary and local government elections are taking place across the country

The counters sort the votes into piles of 25 or 50, and then pass them along to be "bundle-flicked" by a team leader.

Mrs Ridout said the process of flicking through the piles of votes was part of a safety net to make sure all the votes had been counted properly.

"Even over at the main table, they will bundle-flick, if they're just waiting. They'll have thousands, and they'll be counting in hundreds or five hundreds of who's got what.

"Everyone will be just be bundle-flicking. You can never get enough bundle-flicking."

Image caption Count assistants have to be at least 16 years old and cannot work in support of a candidate

The business of counting votes is, of course, taken very seriously by every local authority.

But there is one in particular that prides itself on its record of being the first to declare a result - something it has achieved for the last five general elections in a row.

Sunderland City Council's technique for speedy counting involves sixth formers passing ballot boxes down the line and bank tellers counting the votes.

The local authority also uses lighter paper with a weight of 80g per sq m, rather than 100g, for its ballot papers, making them easier to handle.

"The city council has lots of experience at these counts so we've honed and improved our techniques over the years," said returning officer Dr Dave Smith.

"The prime aim is running an accurate and efficient election count for voters and candidates. If we happen to be first that's a bonus."

Image copyright Colin Talbot Image caption Professor Colin Talbot is in favour of replacing the traditional system with e-voting

But the traditional technique of employing staff to count paper ballots is not universally considered to be the best way of doing things.

"Personally I've been to quite a few counts in my time," said Colin Talbot, a professor of government at the University of Manchester. "It's not something I think we ought to hang on to."

Prof Talbot said the atmosphere tended to be "incredibly stressful for everyone involved" on election night.

"It can get fractious and out of hand in the early hours of the morning when people haven't had any sleep, or they've been out to the pub," he said.

Prof Talbot said he would favour moving towards electronic voting, which would replace the "very 19th Century" system currently in place.

"There's clearly a degree of error in the process, which is inevitable with the number of ballot papers and the number of counters," he said.

"A handful of votes could determine the outcome, which is pretty important. You only need two or three constituencies with even a 1% error and you could change the makeup of the government in this election.

"An electronic system would eliminate errors of that kind, and it would be cheaper."

Image copyright AFP / GETTY IMAGES Image caption Count assistants need stamina, focus and attention to detail, Mrs Ridout said

For the time being, though, Britain is sticking with the tried and tested method of polling booths, ballot boxes and paper vote counting.

Mrs Ridout will be focussed on her task in Clacton, where votes in the parliamentary election will be counted overnight, leaving the district and parish count until Friday daytime.

"When you're sitting there you look like a load of battery hens, or like Willy Wonka and the Chocolate Factory, trying to find the golden ticket, but you're so focussed you just want to get on with it," she said.

"It's always nice when it's over. But even though you can be really tired, as soon as you start counting you get in the zone and you don't notice."

What are her top tips for successful counting?

"Be prepared to stay until the bitter end. You never know how long it's going on for," Mrs Ridout said.

She added that count assistants should try to remain focussed on the task at hand, even if a candidate or one of their agents is leaning over them and scrutinising their every move.

And what about if nature calls before the job is done?

"There's no rule against getting up and nipping to the loo, but it's rare for people who are right in the middle of counting to go off," Mrs Ridout laughed.

"Everyone there is so professional, they just want to get the job done."