The question comes down to who decides what a room is. Does the owner get to pick? How about the designer? In as much as the code has specific requirements for various rooms I think it falls on the code official to determine what the rooms are.Some planning departments require a certain amount of parking per bedroom.
Some jurisdictions size a water heater per the number of bedrooms.
Density studies are based on bedrooms.
I have seen many houses where every room including the garage is a sleeping room.
The owner could say that he has a one bedroom, one den, one study,one office house.
Many times I have heard, "It is the kid's playroom/den/study/sewing room/library/office/TV room/exercise room/store room and it doesn't require an EERO or smoke detector and in times past, arc fault protection.
I always tell them that the building department makes that determination.
The particular use that is present is no indication of what a room is.
A sleeping room isn't required to have a closet or direct access to a bathroom or a hallway that leads to a bathroom.
Any room can have a closet and a door to a bathroom.
Nobody said that this would be easy.