public function dcount($column, $table, $where = '', $replacements = '', $cache = false, $highlight = false) {

        // run the query
        $this->query('

            SELECT
                COUNT(' . $column . ') AS counted
            FROM
                ' . $this->_escape($table) .
            ($where != '' ? ' WHERE ' . $where : '') . '

        ', $replacements, $cache, false, $highlight);

        // if query was executed successfully and one or more records were returned
        if (isset($this->last_result) && $this->last_result !== false && $this->returned_rows > 0) {

            // fetch the result
            $row = $this->fetch_assoc();

            // return the result
            return $row['counted'];

        }

        // if error or no records
        return false;

    }