I think you could think of "wohnen" as "to reside there" and of "leben" as "to go about their lives there", so whether they're (more or less) interchangeable depends on the context:
You can say, "Ich lebe in Berlin" (which seems to focus more on things you do in Berlin: go to work, go out with friends, cook dinner...; while "Ich wohne in Berlin" seems to focus on the house you live in, with its furniture and things); or, in an artist's biography, "Er lebt und arbeitet in Berlin" ("He lives and works in Berlin").
"You're telling me to leave this house?! Ich wohne hier!" - not "Ich lebe hier", because it's clearly about inhabiting the house.
As for this example: "The house rises high above the small village. 20 Familien leben hier." - "wohnen" would be just as fine, but "leben" works because the families "live their lives" in that house and go about their activities, like sleeping, cooking, raising children.