public function count() { $this->_query->type = QueryType::$COUNT; $value = QueryExecutor::prepare($this->_db, $this->_query)->fetch(); return intval(Arrays::firstOrNull(Arrays::toArray($value))); }