Ms. Perine said occupancy laws should be determined not by whether people were related, but by whether a unit was safely inhabited, whether by four people or more.

Sarah Watson, a policy analyst who works with Ms. Perine, said the law had another unintended effect. It put a crimp on innovative construction that might otherwise house larger numbers of single adults, she said.