Elastica\Type\AbstractType::count PHP Method

count() public method

Count docs in the type based on query.
See also: Elastica\SearchableInterface::count
public count ( string | array | Query $query = '' ) : integer
$query string | array | Elastica\Query Array with all query data inside or a Elastica\Query object
return integer number of documents matching the query
    public function count($query = '')
    {
        return $this->getType()->count($query);
    }