public function count($table, $search, $where = '')
    {
        if (empty($where)) {
            $where = 'WHERE';
        } else {
            $where = (stripos($where, 'WHERE') === false) ? "WHERE {$where} AND" : "{$where} AND";
        }

        return $this->db->value("SELECT COUNT(*) FROM {$table} AS s {$where} s.{$table} MATCH ?", $search);
    }