tl;dr Plans existed for medium-term occupancy by a crew of 13 which would bump up to 17 briefly.
The highest planned occupancy I know of would have resulted from a Contingency Shuttle Crew Support (CSCS) case. This was possible for shuttle flights to the ISS (after the STS-107 failure) when the Orbiter's heat shield started being inspected on-orbit. If potentially fatal and irreparable damage was discovered to the heat shield, the 7 person crew would have to stay in the ISS until a rescue shuttle could get there (weeks to months). So that would be 3 US ISS crew + 3 Russian ISS crew + 7 shuttle crew.
When the rescue shuttle arrived, add in the 4 crew from that for 17 during the docked duration.
For all practical purposes the "maximum occupancy" of the complex formed by the station and whatever craft are docked to it is the number of seats available for deorbiting people in case ISS must be abandoned. Not all of them would be in the ISS proper at the same time, except for the traditional group photo op.
Obviously in an emergency (e.g. damaged/unusable return craft), the question of "maxmimum allowed occupancy" becomes meaningless; we're not going to throw people out the airlock.