Dunbar’s number is the cognitive limit to how many people you can maintain a stable social relationship with, commonly pegged to around 150. The theoretical limit was extrapolated using the ratio in size between human vs. other primate brains and the community sizes of those primates. This was supported by various anecdotes and (loosely rigorous) studies.
There may be living edge cases who can surpass this number by orders of magnitude.