Index: src/wp-includes/ms-blogs.php
===================================================================
--- src/wp-includes/ms-blogs.php	(revision 54762)
+++ src/wp-includes/ms-blogs.php	(working copy)
@@ -877,12 +877,12 @@
  * Handler for updating the current site's posts count when a post is deleted.
  *
  * @since 4.0.0
+ * @since 6.2.0 Added the `$post` parameter.
  *
- * @param int $post_id Post ID.
+ * @param int     $post_id Post ID.
+ * @param WP_Post $post    Post object.
  */
-function _update_posts_count_on_delete( $post_id ) {
-	$post = get_post( $post_id );
-
+function _update_posts_count_on_delete( $post_id, $post ) {
 	if ( ! $post || 'publish' !== $post->post_status || 'post' !== $post->post_type ) {
 		return;
 	}
Index: src/wp-includes/ms-default-filters.php
===================================================================
--- src/wp-includes/ms-default-filters.php	(revision 54762)
+++ src/wp-includes/ms-default-filters.php	(working copy)
@@ -75,7 +75,7 @@
 add_filter( 'allowed_redirect_hosts', 'redirect_this_site' );
 
 // Administration.
-add_action( 'after_delete_post', '_update_posts_count_on_delete' );
+add_action( 'after_delete_post', '_update_posts_count_on_delete', 10, 2 );
 add_action( 'delete_post', '_update_blog_date_on_post_delete' );
 add_action( 'transition_post_status', '_update_blog_date_on_post_publish', 10, 3 );
 add_action( 'transition_post_status', '_update_posts_count_on_transition_post_status', 10, 3 );
Index: tests/phpunit/tests/multisite/updatePostsCount.php
===================================================================
--- tests/phpunit/tests/multisite/updatePostsCount.php	(revision 54762)
+++ tests/phpunit/tests/multisite/updatePostsCount.php	(working copy)
@@ -30,7 +30,7 @@
 
 			$post_count_after_creating = get_site()->post_count;
 
-			wp_delete_post( $post_id );
+			wp_delete_post( $post_id, true );
 
 			$post_count_after_deleting = get_site()->post_count;
 
@@ -47,7 +47,7 @@
 
 			/*
 			 * Check that posts count is updated when a post is deleted:
-			 * add_action( 'deleted_post', '_update_posts_count_on_delete' );
+			 * add_action( 'after_delete_post', '_update_posts_count_on_delete', 10, 2 );
 			 *
 			 * Check that _update_posts_count_on_delete() is called on that filter,
 			 * which then calls update_posts_count() to update the count.
