Adding a posts count in archive pages

If the theme your’re using doesn’t do anything fancy, but uses the_archive_title() to render the “Lignano Sabbiadoro”, then you should be able to modify it with the get_the_archive_title filter.

Something along these lines.

add_filter('get_the_archive_title', 'my_get_the_archive_title_filter', 10, 3);
function my_get_the_archive_title_filter(string $title, string $original_title, string $prefix): string {
    if (! is_category()) {
        return $title;

    $current_category = get_queried_object();

    return sprintf(
        '%s <span class="post-count">%d</span>',