src/FrontendIntegration/InsertTags.php
protected function getCountFor($intMetaModelId, $intFilterId)
    {
        $metaModel = $this->loadMetaModel($intMetaModelId);
        if ($metaModel == null) {
            return false;
        }

        $objFilter = $metaModel->getEmptyFilter();
        if ($intFilterId) {
            $collection = $this->getServiceContainer()->getFilterFactory()->createCollection($intFilterId);
            $values     = [];

            foreach ($collection->getParameters() as $key) {
                $values[$key] = Input::get($key);
            }

            $collection->addRules($objFilter, $values);
        }

        return $metaModel->getCount($objFilter);
    }
protected function getCountFor($intMetaModelId, $intFilterId)
    {
        $metaModel = $this->loadMetaModel($intMetaModelId);
        if ($metaModel == null) {
            return false;
        }

        $objFilter = $metaModel->getEmptyFilter();
        if ($intFilterId) {
            $collection = $this->getServiceContainer()->getFilterFactory()->createCollection($intFilterId);
            $values     = [];

            foreach ($collection->getParameters() as $key) {
                $values[$key] = Input::get($key);
            }

            $collection->addRules($objFilter, $values);
        }

        return $metaModel->getCount($objFilter);
    }
Get count form one MM for chosen filter.

@param int $intMetaModelId ID of the metamodels.

@param int $intFilterId    ID of the filter.

@return boolean|int False for no data or integer for the count result.