The secret to popularity could be down to the size of your brain and your ability to guess what other people are thinking, a study has found.
Scientists have found a direct link between the size of the orbital frontal cortex - the part of the brain just above the eyes - and the number of friends a person has.
The orbital frontal cortex is crucial to social skills and the ability to judge the intentions and mental states of others.
Researchers at Liverpool University studied 40 participants. They underwent MRI brain scans and were also asked to list everyone they had engaged with socially over the previous seven days, excluding professional contacts such as doctors, shopkeepers and teachers - unless the contact could be considered a genuine social interaction.
They were also given a psychological test to measure their "mentalising" ability - the technical term for judging what another person is thinking.
The findings, published in the journal Proceedings of the Royal Society B, revealed that those with the most friends had the strongest "mentalising" skills and largest orbital frontal cortex.
Lead researcher Professor Robin Dunbar, from the Institute of Cognitive and Evolutionary Biology at Oxford University, said, as reported by the Press Association: "'Mentalising' is where one individual is able to follow a natural hierarchy involving other individuals' mind states.
"For example, in the play Othello, Shakespeare manages to keep track of five separate mental states... Being able to maintain five separate individuals' mental states is the natural upper limit for most adults.
"We found that individuals who had more friends did better on mentalising tasks and had more neural volume in the orbital frontal cortex, the part of the forebrain immediately above the eyes.
"Understanding this link between an individual's brain size and the number of friends they have helps us understand the mechanisms that have led to humans developing bigger brains than other primate species. The frontal lobes of the brain, in particular, have enlarged dramatically in humans over the last half million years."
The study confirms the link between "mind-reading" skills and the ability to maintain a circle of socially significant friends.
It also backs up the long-held belief that sociality is cognitively demanding and the evolution of brain size has been influenced by these demands.
The findings suggest that the orbital frontal cortex provides the computational power to manage the complex web of social relationships needed to give a social group its cohesion and stability.
Psychologist and co-author Dr Joanne Powell, from the University of Liverpool, said: "Perhaps the most important finding of our study is that we have been able to show that the relationship between brain size and social network size is mediated by mentalising skills."
Professor Dunbar added: "All the volunteers in this sample were postgraduate students of broadly similar ages with potentially similar opportunities for social activities.
"Of course, the amount of spare time for socialising, geography, personality and gender all influence friendship size, but we also know that at least some of these factors, notably gender, also correlate with mentalising skills. Our study finds there is a link between the ability to read how other people think and social network size."
Other recent MRI scan studies have shown that the number of Facebook friends a person has correlates with the size of their grey matter.