/** * Returns result of a count(*) query on the given AQL * using sql_count select type * @param mixed $aql string | aql array * @param array $clause * @return int */ public static function count($aql, $clause = array()) { $rs = aql::sql_result(self::sql($aql, $clause), array('select_type' => 'sql_count')); return $rs[0]['count']; }