Index: src/wp-includes/taxonomy.php
===================================================================
--- src/wp-includes/taxonomy.php	(revision 55892)
+++ src/wp-includes/taxonomy.php	(working copy)
@@ -4109,6 +4109,10 @@
 		if ( $check_attachments ) {
 			// phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedDynamicPlaceholderGeneration
 			$count += (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts p1 WHERE p1.ID = $wpdb->term_relationships.object_id AND ( post_status IN ('" . implode( "', '", $post_statuses ) . "') OR ( post_status = 'inherit' AND post_parent > 0 AND ( SELECT post_status FROM $wpdb->posts WHERE ID = p1.post_parent ) IN ('" . implode( "', '", $post_statuses ) . "') ) ) AND post_type = 'attachment' AND term_taxonomy_id = %d", $term ) );
+
+			// Attachments however _can_ have attached taxonomy items to them, count them as well			
+			$count += (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM wp_term_relationships, wp_posts p1 WHERE p1.ID = wp_term_relationships.object_id AND post_status = 'inherit' AND post_type = 'attachment' AND term_taxonomy_id = %d", $term ) );
+
 		}
 
 		if ( $object_types ) {
