Depends on the code cycle, there is a considerable difference between '05 & '08.
In '05, the door is to the "space", not necessarily to the room. In the '08, there is a measurement added, which is 25' I believe- I am too lazy to open it now.
Also, if the door opens into a hall used for egress, the building code will have some considerations to the install as well.