public function total(array $args = []): int
    {
        // Establish args.

        $default_args = [
            // Also used by {@link all()}.
            'filters'  => [],
            'include'  => [],
            'exclude'  => [],
            'no_cache' => false,
        ];
        $args = array_merge($default_args, $args);
        $args = array_intersect_key($args, $default_args);

        $args['filters']  = (array) $args['filters'];
        $args['include']  = (array) $args['include'];
        $args['exclude']  = (array) $args['exclude'];
        $args['no_cache'] = (bool) $args['no_cache'];

        // Check cache; already did this query?

        $cache_keys = $args; // Keys to consider when checking the cache.
        unset($cache_keys['no_cache']); // Cache key exclusions.

        if (($total = &$this->cacheKey(__FUNCTION__, $cache_keys)) !== null && !$args['no_cache']) {
            return $total; // Already cached this.
        }
        // Establish total post types in the query.

        $post_types = get_post_types($args['filters'], 'objects');
        $post_types = $args['include'] ? array_intersect_key($post_types, array_fill_keys($args['include'], true)) : $post_types;
        $post_types = $args['exclude'] ? array_diff_key($post_types, array_fill_keys($args['exclude'], true)) : $post_types;

        return $total = count($post_types);
    }