Image copyright Getty Images

It's a truism that if something can't be seen, it can't be easily counted. But this hasn't stopped statisticians when it comes to illegal immigrants.

The latest attempt is a fascinating paper on the European Union (EU) picture from the Pew Research Centre.

The Washington-based think tank has a global reputation for interpreting the trends that shape the modern world - and so its findings will always make headlines.

The claim in the Pew paper is simple: there may have been between 800,000 and 1.2 million unauthorised migrants living in the UK in 2017.

Pew's definition of an "unauthorised" migrant is anyone living in a country without a residency permit. Some politicians would refer to the same group of people as "illegal migrants". Others use the phrase "undocumented migrants".

Here are some examples of who could be counted:

a temporary worker who stays on after their visa has expired.

someone who has paid a smuggler to help them enter the country

someone who has sought asylum and had their case rejected

How did Pew come up with the figure?

Experts have debated for years the best way to count unauthorised migrants. One approach involves asking people with potential insights - such as construction managers who check identity documents - for their informed view.

Another, known as "snowballing", relies on researchers finding unauthorised migrants and using them to identify others - thereby gathering more and more data.

For the UK, Pew used the "residual" method. It's an attempt to estimate the number of migrants who are left over when everyone who can be counted has been.

Estimated number of unauthorised immigrants in the UK

Firstly, Pew took UK figures on the number of non-EU nationals living in the country.

Then, it gathered separate data on non-EU people with recorded and legal residency.

Here's the 2017 data for the UK:

The Office for National Statistics said there were an estimated 2.4 million non-EU citizens living in the UK.

The Home Office separately said 1.5 million non-EU citizens had some form of legal residency, such as work visas.

It then subtracted the number of non-EU citizens with legal residency from the overall estimated number.

And, after some further tweaks to the data explained in the paper, Pew came up with its 800,000-to-1.2 million range.

But here's the problem. That estimate... is built on estimates.

As we have reported before - the UK has absolutely no idea how many people from abroad are actually in the country at any one time.

Secondly, the Home Office doesn't even know how many of the people it thinks are in the country are legally resident.

For instance, it has no means of knowing for sure whether someone has left for another country or died.

The Windrush scandal further exposed that the government had lost a vast number of its own records of grants of permission to reside in the country.

Pew notes all these shortcomings - but hopes its data is as close as it can get to a useful figure to help inform policy-makers.

How does it compare with other estimates?

Given what we know about the general trend in migration over the past 20 years, and previous attempts to calculate the number of unauthorised migrants in the UK, the paper is not inconsistent with other estimates.

The Home Office published its first best guess in 2005. The figure ranged from 310,000 to 570,000.

A later study developed the data and concluded that by the end of 2007 the range was between 417,000 and 863,000 people, including children born in the UK.

In the years since, the UK and the EU have experienced repeated periods of high immigration. So Pew's 2017 range is not at odds with the bigger story.

All that said, any count will rely on estimates and extrapolations - and critics will suggest those are no more useful than scribbles on the back of an envelope.

Read more from Reality Check

Send us your questions

Follow us on Twitter