Add the below in your theme’s functions.php. It should work the way you want
function my_list_categories( $output, $args ) {
$output = str_replace( '(0)', '(No Posts)', $output );
$output = preg_replace( '/\((\d+)\)/', '(Has Posts)', $output );
return $output;
}
add_filter( 'wp_list_categories', 'my_list_categories', 10, 2 );