facetwp modify facet count

<?php

/** removes () from count, could also be used to replace with alternate bracketing or other output **/

add_filter( 'facetwp_facet_html', function( $output, $params ) {
	if ( 'product_categories' == $params['facet']['name'] ) {
		$output = preg_replace( '/(([0-9]+))/', '$1', $output );
	}
	return $output;
}, 10, 2 );