Index: src/wp-includes/user.php
===================================================================
--- src/wp-includes/user.php	(revision 60000)
+++ src/wp-includes/user.php	(working copy)
@@
 function count_many_users_posts( $users, $post_type = 'post', $public_only = false ) {
 	global $wpdb;
 
 	if ( empty( $users ) || ! is_array( $users ) ) {
 		return array();
 	}
 
+	$cache_key = 'count_many_users_posts:' . md5( maybe_serialize( $users ) . '|' . $post_type . '|' . ( $public_only ? '1' : '0' ) );
+	$cached = wp_cache_get( $cache_key, 'counts' );
+	if ( false !== $cached ) {
+		return $cached;
+	}
+
 	$users = array_map( 'intval', $users );
 
 	$where = get_posts_by_author_sql( $post_type, true, $users, $public_only );
 	$where = preg_replace( '/^\s*AND\s*/', '', $where );
 
 	$userlist = implode( ',', $users );
 
 	$count = $wpdb->get_results( "SELECT post_author, COUNT(*) AS post_count FROM $wpdb->posts WHERE $where AND post_author IN ($userlist) GROUP BY post_author", ARRAY_A );
 
 	$counts = array_fill_keys( $users, 0 );
 	foreach ( $count as $row ) {
 		$counts[ $row['post_author'] ] = (int) $row['post_count'];
 	}
+
+	wp_cache_set( $cache_key, $counts, 'counts' );
 
 	return $counts;
 }
