/** * Count the number of items in a collection with an optional query. * * @param null|array|\Closure $query The query to use to filter the collection. * * @return int The number of items in the collection filtered by the query. */ public function count($query) { return $this->peer->count($query); }