Facetwp modify facet counts – remove parentheses

<?php

/** removes the parentheses () from facet counts. Could also be used to replace with alternate bracketing or other output **/

add_filter( 'facetwp_facet_html', function( $output, $params ) {
	if ( 'my_facet_name' == $params['facet']['name'] ) {
		$output = preg_replace( '/\(|\)/','', $output );
	}
	return $output;
}, 10, 2 );