When renting out a single family home only 2 unrelated people can live in the single family home.
So if you have a single family home then you could rent out a couple rooms to two different unrelated people or you could rent out the room to a couple people that are related.
If it's relations then you can have an unlimited amount of relations living in the single family home with you as long as they are family.
But when it comes to renting out rooms you're limited to only 2 unrelated people living in the single family home.
Also check with zoning and other ordinances as they can be different in the rules in different places.
Or if you live in an HOA area then they may forbid the act of renting out rooms.