But I am not sure how effectively they extrapolated from 5,000 people total in the survey to say that 4.7 million have no real friends. You can lose a lot in transferring data from the particular to the general.
From "methodology" on the linked page -
"It was conducted using an online survey administered by members of the YouGov UK panel of 442,100 individuals who have agreed to take part in surveys. An email was sent to panellists selected at random from the base sample, according to the sample definition, providing a link to the online survey and inviting them to take part."
So it was a survey of about 5000 members from a YouGov panel who a) were online, b) had volunteered to do surveys,c) had the time in their not-very-busy social lives to take part.
And also
"The results of this survey do come with some caveats around representativeness. The results were weighted to make the data more representative of the population (of UK adults aged 16+) in terms of age, gender, region and country, and an indicator of social class (based on census information). However, our sample may still differ from the population at large according to other unobserved factors, including those that are the subject of our survey, such as relationships and sexual behaviour."
Iit is admitted that there could be questions about representativeness. Results were weighted artificially to try to make it more representative, and important factors like relationships (which are relevant to loneliness) were unobserved.