Legally, What’s Considered a Bedroom in NYC?

As I am considering to move closer to my office, I am irritated by other real estate agent’s labeling of an apartment that has two bedrooms but clearly has only one. Unfortunately, real estate agents in NYC are notorious for that!