Index: src/wp-includes/user.php
===================================================================
--- src/wp-includes/user.php	(revision 59865)
+++ src/wp-includes/user.php	(working copy)
@@ -661,6 +661,18 @@
 	global $wpdb;
 
 	$count = array();
+
+	/**
+	 * Short-circuit counting of users' posts.
+	 *
+	 * @since 6.8.0
+	 *
+	 * @param bool $skip_count Whether to skip counting the users' posts.
+	 */
+	if ( apply_filters( 'skip_count_many_users_posts', false ) ) {
+		return $count;
+	}
+
 	if ( empty( $users ) || ! is_array( $users ) ) {
 		return $count;
 	}
