Number of beds in the world

If you have 9B people, even if the number of travellers and patients etc. exceeds the number of homeless by five times, or other way round, you still have about 9B beds.

It seems to me that there are only three factors that are relevant, here, because everything else on either side would be so much smaller as to be irrelevant:

On the more-beds side, there are people who have moved out of their childhood home, and now have a home (and bed) of their own, but their parents still live in the childhood home and keep the old bedroom more-or-less intact.

On the fewer-beds side, there are a lot of people who share beds, either out of need or romance.

And also on the fewer-beds side, there are places in the world where most people lack beds as defined in the OP, either for economic or cultural reasons.

Hotels, hospitals, and homeless people would all be much smaller than any of those three.

I’m more like @Dr_Paprika 's opinion, but with a little revision: ~10B beds for 8B people.
The (apparent) lack of official records or research makes this hard to pinpoint. Let’s hope for someone of knowledge to stumble upon the thread.