def _get_count(self, allocator, resource_desc, credentials):
        set_credentials(credentials)
        count = 0
        adjusted = (self._method == 'load-average')
        try:
            count, criteria = allocator.max_servers(resource_desc,
                                                    load_adjusted=adjusted)
        except Exception:
            msg = traceback.format_exc()
            self._logger.error('%r max_servers() caught exception %s',
                               allocator.name, msg)
        else:
            if count < 1:
                self._logger.debug('%s incompatible: %s',
                                   allocator.name, criteria)
        return max(count, 0)
Get `max_servers` from an allocator.
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/resource.py/ClusterAllocator._get_count