public function count($sql) { $result = $this->query($sql); return \System\Database\Query::first_val($result->fetch()); }