@Override
    public int getNumberRoomOccupants() {
        int total = 0;
        for (final Set<OccupantManager.Occupant> nodeSet : occupantManager.getLocalOccupantsByNode().values()) {
            total += nodeSet.size();
        }
        total += occupantManager.getFederatedOccupants().size();
        return total;
    }
Returns the total number of users that have joined in all rooms in the server.

@return the number of existing rooms in the server.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MultiUserChatServiceImpl.java