The Forbidden City was designed with just under 10,000 rooms.
Legend states that the Forbidden City was built with 9,999.5 rooms because only the Jade Emperor in heaven could have a palace with 10,000 rooms. The emperor's palace on Earth had to be slightly smaller to show respect.