src/Query.php
public function count()
    {

        $query = $this->query();

        // Remove unsupported count query keys

        unset(
            $query["size"],
            $query["from"],
            $query["body"]["_source"],
            $query["body"]["sort"]
        );

        return $this->connection->count($query)["count"];
    }
public function count()
    {

        $query = $this->query();

        // Remove unsupported count query keys

        unset(
            $query["size"],
            $query["from"],
            $query["body"]["_source"],
            $query["body"]["sort"]
        );

        return $this->connection->count($query)["count"];
    }
public function count ( ) { $ query = $ this -> query ( ) ; // Remove unsupported count query keys unset ( $ query [ "size" ] , $ query [ "from" ] , $ query [ "body" ] [ "_source" ] , $ query [ "body" ] [ "sort" ] ) ; return $ this -> connection -> count ( $ query ) [ "count" ] ; }
Get the count of result
@return mixed
Get the count of result