Room numbering is different at every resort, and even within a resort it can change.
Careful, this post may have more about Disney room numebring than you'll ever want to know.
I know for Caribbean Beach, the first two digits are the building number. The last two digits can be anywhere from 01 to 64. Rooms 01 to 32 are on the first floor (with numbers starting at one corner of the building and wrapping all the way around so that room 32 is behind room 01), and rooms 33 to 64 are on the second floor, in the same order as on the first.
At Riverside, the Aligator Bayou buildings follow this exact same rule, seeing as how they're essentially the same design as the CBR buildings, just with different exteriors.
The Mansion buildings are where it gets tricky. I don't know the exact rule, but the first two digits tell you not only what building you're in, but also the floor and the side of the building you're in.
I may have the north/south swapped but as an example, Oak Manor is Building 90 at POR. Rooms 90xx are on the first floor of the north half of the building, rooms 91xx are the first floor of the south half. Rooms 92xx are second floor north, 93xx are second floor south. And finally 94xx are the rooms on the third floor, which are only in the center section of the building.
I would presume that the Cabanas buildings at Coronado Springs, which are yet again the same design at the CBR buildings, follows this scheme, but perhaps with a slight alteration because of the 8A/8B and 9A/9B building numbers.
The numbering schemes are also a bit odd at the All-Stars. There, the rooms numbers were set up so that every room has a unique room number within the entire All-Star complex.
The first two digits point toward a building number and floor combination. Rooms 11xx are the first floor of Building 1 at Sports, Rooms 14xx are first floor of Building 1 at Music, Rooms 17xx are first floor of Building 1 at Movies. Then the second floor of those buildings would be, in order, 12xx, 15xx and 18xx. Building 10 is indicated by a Zero in the first digit.
At Pop Century, it's currently that the first digit is the building (with a zero indicating Building 10), and the second digit is the floor. I presume that the original plan was that the Legendary Years would follow the same "no room number is duplicated" scheme as at the All-Stars, where the first floor on their building 1 would start 15xx. It remains to be seen if they will still follow this scheme when Art of Animation opens.
At both the All-Stars and Pop Century, the last two digits mark the room number. I believe they start with 01 to the right of the center icon of the building (when facing the icon) and then wrap around the building, ending to the left of the icon with room 64 at the All-Stars, and 72 at Pop Century (because of the larger buildings).
So putting all that together, room number 9964 at All-Star Movies would be Building 9, third floor, the room just to the left of the icon for that building (when looking from the courtyard).
Whew! Got all that?
-Rob