That's an interesting question. However, you realize that value is after all subjective. As is the word home, what exactly constitutes a home? Is a tent a home? Is an RV a home? Is a mud hut a home? Could we calculate the estimated worth of every home, possibly. But in a practical sense, how much would they really be worth is dependent on the person selling the home. Some people probably wouldn't sell no matter how much money you gave them. There's no way to calculate how much money it would actually take to buy up all the homes. Mostly because if there was a housing shortage (given that one person would be owning all these homes), the prices would go up. And people would probably start building more houses. Would you include these new houses then? Or all the houses at this exact moment?
There would be no exact number but there is no way anyone in the world can buy every house in the world, for two reasons. That takes mad cash and second because that's way over hundreds of billions of dollars. In my opinion that would be the dumbest thing to ever do, because everyone in the world would be homeless because of you. And why would you need so many places to live.
When you think about it there are more than a million people in the world houses cost from $70,000 to a million dollars so it would take alot of money just to buy a few of the celebirtys' houses or bigger & nicer houses.
Close to what I was going to say: for some people, simply the forest is their home, or a certain corner of the street, the underside of a certain bridge.