Sun used to assign offices to two people.
I personally don't mind sharing office space with less than about four coworkers. In a small(!), shared office there is enough social pressure to keep concentration periods quiet, or agree on shared music choices, &c. and still maintain the advantages of having what amounts to a team meeting space for collaboration in the same footprint.