Returns the count of the currently displayed results.<p>

@param searchObj the search bean

@return the count of the currently displayed results
542004
private int getResultsDisplayed(CmsGallerySearchBean searchObj) {

        int resultsDisplayed = searchObj.getMatchesPerPage() * searchObj.getLastPage();
        return (resultsDisplayed > searchObj.getResultCount()) ? searchObj.getResultCount() : resultsDisplayed;
    }
487191
public SearchResponse searchWithTargetCount(
            SearchRequestBuilder searchRequestBuilder,
            AggregationBuilder[] aggregationBuilders) {
        return searchWithTargetCount(getSearchRequestBuilder(
                getSearchRequestBuilderWithCount(searchRequestBuilder),
                aggregationBuilders));
    }
676678
public static int countPaged(String keyspace,
                                 String columnFamily,
                                 ByteBuffer key,
                                 SliceQueryFilter filter,
                                 ConsistencyLevel consistencyLevel,
                                 ClientState cState,
                                 final int pageSize,
                                 long now) throws RequestValidationException, RequestExecutionException
    {
        SliceFromReadCommand command = new SliceFromReadCommand(keyspace, key, columnFamily, now, filter);
        final SliceQueryPager pager = new SliceQueryPager(command, consistencyLevel, cState, false);

        ColumnCounter counter = filter.columnCounter(Schema.instance.getCFMetaData(keyspace, columnFamily).comparator, now);
        while (!pager.isExhausted())
        {
            List<Row> next = pager.fetchPage(pageSize);
            if (!next.isEmpty())
                counter.countAll(next.get(0).cf);
        }
        return counter.live();
    }
53117
@View(name = "count", map = "function(doc) { if(doc.secretKey) { emit(doc._id, doc) } }", reduce = "_count")
    public long count() {
        return db.queryView(createQuery("count")).getRows().get(0).getValueAsInt();
    }
41601
def search_count(q)
      counts = handle_response(get("/searchcount.json", :query => {:q => q}))
      Topsy::SearchCounts.new(counts)
    end
1374368
protected CmsObject getSearchCms(CmsGallerySearchBean searchObj) throws CmsException {

        CmsObject searchCms = getCmsObject();
        if (searchObj.isIncludeExpired()) {
            searchCms = OpenCms.initCmsObject(getCmsObject());
            searchCms.getRequestContext().setRequestTime(CmsResource.DATE_RELEASED_EXPIRED_IGNORE);
        }
        return searchCms;
    }
1137761
public SearchResponse searchAllWithTargetCount(String index, String type,
            QueryBuilder filterQueryBuilder,
            AggregationBuilder[] aggregationBuilders) {
        return searchAllWithTargetCount(JMArrays.buildArray(index),
                JMArrays.buildArray(type), filterQueryBuilder,
                aggregationBuilders);
    }
648322
public int queryObjJoinCountByCondition(String sql,Object[] paramArray){
		/*		JdbcTemplate jdbcTemplate = (JdbcTemplate) MicroDbHolder
		.getDbSource(dbName);*/
		JdbcTemplate jdbcTemplate = getMicroJdbcTemplate();
		logger.debug(sql);
		logger.debug(Arrays.toString(paramArray));
		Integer total=jdbcTemplate.queryForObject(sql,Integer.class,paramArray);
		return total;
	}
684208
public int compareTo(CmsMimeType obj) {

        if (obj == this) {
            return 0;
        }
        int result = m_type.compareTo(obj.m_type);
        if (result == 0) {
            result = m_extension.compareTo(obj.m_extension);
        }
        return result;
    }
195653
public function getRelatedObjectsCount()
    {
        // Not an easy task to fetch published objects with API and take care of current_version, status
        // and attribute version, so just use SQL to fetch the object count in one go
        $tagID = (int) $this->attribute( 'id' );

        $db = eZDB::instance();
        $result = $db->arrayQuery( "SELECT COUNT(DISTINCT o.id) AS count FROM eztags_attribute_link l
                                   INNER JOIN ezcontentobject o ON l.object_id = o.id
                                   AND l.objectattribute_version = o.current_version
                                   AND o.status = " . eZContentObject::STATUS_PUBLISHED . "
                                   WHERE l.keyword_id = $tagID" );

        if ( is_array( $result ) && !empty( $result ) )
            return (int) $result[0]['count'];

        return 0;
    }
820605
@Nonnegative
  public static int getOccurrenceCount (@Nullable final String sText, final char cSearch)
  {
    int ret = 0;
    final int nTextLength = getLength (sText);
    if (nTextLength >= 1)
    {
      int nLastIndex = 0;
      int nIndex;
      do
      {
        // Start searching from the last result
        nIndex = getIndexOf (sText, nLastIndex, cSearch);
        if (nIndex != STRING_NOT_FOUND)
        {
          // Match found
          ++ret;

          // Identify the next starting position (relative index + number of
          // search strings)
          nLastIndex = nIndex + 1;
        }
      } while (nIndex != STRING_NOT_FOUND);
    }
    return ret;
  }
25496
private void showUpload(CmsGallerySearchBean searchObj) {

        Set<String> targets = new HashSet<String>();

        if (searchObj.getGalleries() != null) {
            targets.addAll(searchObj.getGalleries());
        }
        if (searchObj.getFolders() != null) {
            targets.addAll(searchObj.getFolders());
        }
        if (m_createNewButton != null) {
            m_createNewButton.removeFromParent();
            m_createNewButton = null;
        }
        if (m_uploadButton == null) {
            m_uploadButton = createUploadButtonForTarget("", false);
            m_uploadButton.addStyleName(I_CmsLayoutBundle.INSTANCE.galleryDialogCss().resultTabUpload());
            m_tab.insert(m_uploadButton, 0);
        } else {
            m_uploadButton.getElement().getStyle().clearDisplay();
        }
        if (targets.size() == 1) {
            CmsGalleryFolderBean galleryFolder = getTabHandler().getGalleryInfo(targets.iterator().next());
            if ((galleryFolder != null)
                && CmsEditExternalLinkDialog.LINK_GALLERY_RESOURCE_TYPE_NAME.equals(galleryFolder.getType())) {
                m_createNewButton = createNewExternalLinkButton(targets.iterator().next());
                if (m_createNewButton != null) {
                    m_createNewButton.addStyleName(I_CmsLayoutBundle.INSTANCE.galleryDialogCss().resultTabUpload());
                    m_tab.insert(m_createNewButton, 0);
                    if (CmsStringUtil.isEmptyOrWhitespaceOnly(searchObj.getNoUploadReason())) {
                        m_createNewButton.enable();
                    } else {
                        m_createNewButton.disable(searchObj.getNoUploadReason());
                    }
                }

                m_uploadButton.getElement().getStyle().setDisplay(Display.NONE);
            } else {
                String uploadTarget = targets.iterator().next();
                I_CmsUploadButtonHandler handler = m_uploadButton.getButtonHandler();
                if (handler instanceof CmsDialogUploadButtonHandler) {
                    ((CmsDialogUploadButtonHandler)handler).setTargetFolder(uploadTarget);
                    // in case the upload target is a folder the root path is used
                    ((CmsDialogUploadButtonHandler)handler).setIsTargetRootPath(searchObj.getFolders().size() == 1);
                }
                if (CmsStringUtil.isEmptyOrWhitespaceOnly(searchObj.getNoUploadReason())) {
                    m_uploadButton.enable();
                    m_uploadButton.setTitle(Messages.get().key(Messages.GUI_GALLERY_UPLOAD_TITLE_1, uploadTarget));
                } else {
                    m_uploadButton.disable(searchObj.getNoUploadReason());
                }
            }
        } else {
            m_uploadButton.disable(Messages.get().key(Messages.GUI_GALLERY_UPLOAD_TARGET_UNSPECIFIC_0));
        }

    }
695496
@Override
	public int countByLtD_S(Date displayDate, int status) {
		FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_LTD_S;

		Object[] finderArgs = new Object[] { _getTime(displayDate), status };

		Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);

		if (count == null) {
			StringBundler query = new StringBundler(3);

			query.append(_SQL_COUNT_CPINSTANCE_WHERE);

			boolean bindDisplayDate = false;

			if (displayDate == null) {
				query.append(_FINDER_COLUMN_LTD_S_DISPLAYDATE_1);
			}
			else {
				bindDisplayDate = true;

				query.append(_FINDER_COLUMN_LTD_S_DISPLAYDATE_2);
			}

			query.append(_FINDER_COLUMN_LTD_S_STATUS_2);

			String sql = query.toString();

			Session session = null;

			try {
				session = openSession();

				Query q = session.createQuery(sql);

				QueryPos qPos = QueryPos.getInstance(q);

				if (bindDisplayDate) {
					qPos.add(new Timestamp(displayDate.getTime()));
				}

				qPos.add(status);

				count = (Long)q.uniqueResult();

				finderCache.putResult(finderPath, finderArgs, count);
			}
			catch (Exception e) {
				finderCache.removeResult(finderPath, finderArgs);

				throw processException(e);
			}
			finally {
				closeSession(session);
			}
		}

		return count.intValue();
	}
1176184
public int getCount() {
        Lock lock = this.lock.readLock();
        lock.lock();
        try {
            return this.count;
        } finally {
            lock.unlock();
        }
    }
705830
public long countQuery(SearchRequestBuilder countRequestBuilder,
            long timeoutMillis) {
        countRequestBuilder.setSize(0);
        return searchQuery("countQuery", countRequestBuilder, timeoutMillis)
                .getHits().getTotalHits();
    }
818561
@Override
	public long dynamicQueryCount(DynamicQuery dynamicQuery,
		Projection projection) {
		return commerceWishListPersistence.countWithDynamicQuery(dynamicQuery,
			projection);
	}
23676
public void fillResultTab(CmsGallerySearchBean searchObj) {

        if (m_resultsTab == null) {
            return;
        }
        List<CmsSearchParamPanel> paramPanels = null;
        if (!searchObj.isEmpty()) {
            enableSearchTab();
            paramPanels = new ArrayList<CmsSearchParamPanel>();
            Iterator<A_CmsTab> it = m_tabbedPanel.iterator();
            while (it.hasNext()) {
                A_CmsTab tab = it.next();
                paramPanels.addAll(tab.getParamPanels(searchObj));
            }
            m_resultsTab.fillContent(searchObj, paramPanels);
        }
    }