Return False or the number of component sitemaps required.

        In the case that no len() is available for self.resources then
        then self.count must be set beforehand to avoid an exception.
777303
def requires_multifile(self):
        
        if (self.max_sitemap_entries is None or
                len(self) <= self.max_sitemap_entries):
            return(False)
        return(int(math.ceil(len(self) / float(self.max_sitemap_entries))))
386655
public boolean showSiteSelector() {

        if (getSettings().getUserSettings().getRestrictExplorerView()) {
            // restricted explorer view to site and folder, do not show site selector
            return false;
        }
        // count available sites
        int siteCount = OpenCms.getSiteManager().getAvailableSites(getCms(), true).size();
        return (siteCount > 1);
    }
722449
public static long count_filtered(nitro_service service, String sitename, String filter) throws Exception{
		gslbsite_gslbservice_binding obj = new gslbsite_gslbservice_binding();
		obj.set_sitename(sitename);
		options option = new options();
		option.set_count(true);
		option.set_filter(filter);
		gslbsite_gslbservice_binding[] response = (gslbsite_gslbservice_binding[]) obj.getfiltered(service, option);
		if (response != null) {
			return response[0].__count;
		}
		return 0;
	}
707736
def _get_num_locations(d):
    
    lengths = []
    for key in EXCEL_GEO:
        try:
            if key != "siteName":
                lengths.append(len(d[key]))
        except Exception:
            lengths.append(1)

    try:
        num = max(lengths)
    except ValueError:
        num = 0
    return num
329876
public Integer getCount(ResourceType resourceType) {
    Integer count = typeToCountMap.get(resourceType);
    if (count == null) {
      return 0;
    } else {
      return count;
    }
  }
13410
def count(self, view, include=None):
        
        return self._get(self._build_url(self.endpoint.count(id=view, include=include)))
1118622
private CmsListInfoBean buildSitemapTypeInfo(I_CmsResourceType sitemapType) {

        CmsListInfoBean result = new CmsListInfoBean();
        CmsWorkplaceManager wm = OpenCms.getWorkplaceManager();
        String typeName = sitemapType.getTypeName();
        Locale wpLocale = wm.getWorkplaceLocale(getCmsObject());
        String title = typeName;
        String description = "";
        try {
            title = CmsWorkplaceMessages.getResourceTypeName(wpLocale, typeName);
        } catch (Throwable e) {
            LOG.warn(e.getLocalizedMessage(), e);
        }
        try {
            description = CmsWorkplaceMessages.getResourceTypeDescription(wpLocale, typeName);
        } catch (Throwable e) {
            LOG.warn(e.getLocalizedMessage(), e);
        }
        result.setResourceType(typeName);
        result.setTitle(title);
        result.setSubTitle(description);
        return result;
    }
491465
def checkAndRaise(pageNum, itemsPerPage):
        
        if pageNum < 1:
            raise ErrPaginationLimits(ErrPaginationLimits.ERR_PAGE_NUM)
        
        if itemsPerPage < Settings.itemsPerPageMin or itemsPerPage > Settings.itemsPerPageMax:
            raise ErrPaginationLimits(ErrPaginationLimits.ERR_ITEMS_PER_PAGE)
168997
def has_restricted_sites(self, request):
        
        sites = self.get_restricted_sites(request)
        return sites and sites.count() == 1
1273944
def _check_for_more_pages(self):
        
        self._has_more = len(self._items) > self.per_page

        self._items = self._items[0 : self.per_page]
809562
def count_(self):
        
        try:
            num = len(self.df.index)
        except Exception as e:
            self.err(e, "Can not count data")
            return
        return num
137281
def get_total_pages(self):
        

        if self.total_elements is None or self.page_size is None:
            return None

        return math.ceil(float(self.total_elements) / float(self.page_size))
1188706
def count(self):
        '''
        
        '''
        args = self.format_args
        if args is None or \
                (isinstance(args, dict) and self.count_field not in args):
            raise TypeError("count is required")
        return args[self.count_field] if isinstance(args, dict) else args
957035
def need_geocoding(self):
        
        need_geocoding = False
        for attribute, component in self.required_address_components.items():
            if not getattr(self, attribute):
                need_geocoding = True
                break  # skip extra loops
        return need_geocoding
737711
def _set_sitevisitors(self):
        
        data = self._load_response('sitevisitors').get('query')

        siteviews = data.get('siteviews')
        if siteviews:
            values = [x for x in siteviews.values() if x]
            if values:
                self.data['visitors'] = int(sum(values) / len(values))
            else:
                self.data['visitors'] = 0
1282741
public CmsSitemapData getSitemapData() {

        if (m_sitemapData == null) {
            try {
                m_sitemapData = CmsVfsSitemapService.prefetch(
                    getRequest(),
                    getCmsObject().getRequestContext().getUri());
            } catch (CmsRpcException e) {
                LOG.error(e.getLocalizedMessage(), e);
            }
        }
        return m_sitemapData;
    }
596546
private boolean inExcludedHostsList(TaskTrackerStatus status) {
    Set<String> excludeList = hostsReader.getExcludedHosts();
    return excludeList.contains(status.getHost());
  }