Adding count also to parent categories

You could add this to your code:

function custom_add_count_on_archive_title( $title ) {
    $term = get_queried_object();
    $term_id = get_queried_object()->term_id;
    if( $term instanceof WP_Term && 'category' === $term->taxonomy ) {
        
        $children_terms = get_terms(array(
            'taxonomy' => 'category',
            'child_of' => $term_id,
        ));
        
        $total_count = 0;
        
        if (!empty($children_terms) && !is_wp_error($children_terms)) {
            foreach ($children_terms as $child_term) {
                $total_count += $child_term->count;
            }
        }
    
        $title .= ' <span>'.$total_count.'</span>';
    }
    return $title;
}
add_filter( 'get_the_archive_title', 'custom_add_count_on_archive_title', 10, 1 );

Have not tested it but theoretically it should work. What it does is gets the children of the current term. Iterates through them and totals the count of them.

deneme bonusudeneme bonusu veren sitelerpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casino