Replace facet counts with “10+” if the count is > 10

<?php

add_filter( 'facetwp_facet_render_args', function( $args ) {
    if ( isset( $args['values'] ) && isset( $args['values'][0]['counter'] ) ) {
        foreach ( $args['values'] as $key => $val ) {
            if ( $val['counter'] > 10 ) {
                $args['values'][ $key ]['counter'] = '10+';
            }
        }
    }
    return $args;
});