From a working group standpoint, the number is somewhere between 150 and 250: that's how many people we can personally know and learn to trust and share responsibilities.
As Jared Diamond points out about religious rituals and cultures, though, beyond the people we know, you have to set up codes or systems of trust and exclusion to establish the 'in' vs. the 'out' crowd.
The fundamental problem, as I see it, is an overriding learned competitiveness that humans have used to accelerate things like war, markets, education and exploration.
Now that we have explored the planet and beyond, we have to re-educate for cooperation instead of competition. Doing so on a village or single state basis is self-defeating, as the greater powers will use force to take advantage of passive behavior.
This is where the lesson of religions (and, unfortunately, terrorism) comes into play: motivated groups need to establish useful tools of communication and cooperation that undermine the Powers That Be without becoming victims of censorship and bigotry. They have to spread those tools and develop a community-building, regenerative existence while not threatening the status quo until the status quo (Competitive Consumptionism (colonialism)) becomes irrelevant and/or collapses from the weight of its own unsustainable complexity.
In other words, people have to learn to live locally and do it globally without letting the Neo-Liberal Global Capitalists see what is going on.
Can you do it 50 people at a time? 1000? 1 million?.
It will depend on how climate disasters cooperate to isolate groups from the 'grid'.
We may see whole continents (South America, Africa, Australia) cut ties with world banking and energy sectors just because they are tired of wars they didn't start.