Index: wp-admin/admin.php
===================================================================
--- wp-admin/admin.php	(revision 13607)
+++ wp-admin/admin.php	(working copy)
@@ -38,6 +38,7 @@
 		 * @since 2.8.4b
 		 */
 		$c = get_blog_count();
+		$c = $c->active;
 		if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int)( $c / 50 ) ) == 1 ) ) {
 			require_once( ABSPATH . WPINC . '/http.php' );
 			$response = wp_remote_get( admin_url( 'upgrade.php?step=1' ), array( 'timeout' => 120, 'httpversion' => '1.1' ) );
Index: wp-admin/includes/ms.php
===================================================================
--- wp-admin/includes/ms.php	(revision 13607)
+++ wp-admin/includes/ms.php	(working copy)
@@ -160,6 +160,8 @@
 
 	// allow for commit transaction
 	do_action('deleted_user', $id);
+	
+	delete_site_transient( "user_count" );
 
 	return true;
 }
@@ -497,7 +499,9 @@
 		else
 			do_action( "make_ham_user", $id );
 	}
-
+	
+	delete_site_transient( "user_count" );
+	
 	return $value;
 }
 
Index: wp-admin/ms-admin.php
===================================================================
--- wp-admin/ms-admin.php	(revision 13607)
+++ wp-admin/ms-admin.php	(working copy)
@@ -21,8 +21,8 @@
 $c_users = get_user_count();
 $c_blogs = get_blog_count();
 
-$user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) );
-$blog_text = sprintf( _n( '%s site', '%s sites', $c_blogs ), number_format_i18n( $c_blogs ) );
+$user_text = sprintf( _n( '%s user', '%s users', $c_users->active ), number_format_i18n( $c_users->active ) );
+$blog_text = sprintf( _n( '%s site', '%s sites', $c_blogs->active ), number_format_i18n( $c_blogs->active ) );
 
 $sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text );
 ?>
Index: wp-includes/ms-blogs.php
===================================================================
--- wp-includes/ms-blogs.php	(revision 13607)
+++ wp-includes/ms-blogs.php	(working copy)
@@ -501,6 +501,8 @@
 		else
 			do_action( "make_ham_blog", $blog_id );
 	}
+	
+	delete_site_transient( "blog_count" );
 
 	return $value;
 }
Index: wp-includes/ms-functions.php
===================================================================
--- wp-includes/ms-functions.php	(revision 13607)
+++ wp-includes/ms-functions.php	(working copy)
@@ -5,23 +5,6 @@
  * @package WordPress
  */
 
-function get_sitestats() {
-	global $wpdb;
-
-	$stats['blogs'] = get_blog_count();
-
-	$count_ts = get_site_option( 'user_count_ts' );
-	if ( time() - $count_ts > 3600 ) {
-		$count = $wpdb->get_var( "SELECT COUNT(ID) FROM $wpdb->users" );
-		update_site_option( 'user_count', $count );
-		update_site_option( 'user_count_ts', time() );
-	} else {
-		$count = get_site_option( 'user_count' );
-	}
-	$stats['users'] = $count;
-	return $stats;
-}
-
 function get_admin_users_for_domain( $sitedomain = '', $path = '' ) {
 	global $wpdb;
 
@@ -201,16 +184,20 @@
 
 function get_user_count() {
 	global $wpdb;
+	
+	$count = get_site_transient( "user_count" );
+	
+	if ( false !== $count )
+		return $count;
+		
+	$count['active'] = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '0' AND deleted = '0'") );
+	$count['all'] = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(ID) as c FROM $wpdb->users") );
+	$count['spam'] = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '1'") );
+	$count['deleted'] = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(ID) as c FROM $wpdb->users WHERE deleted = '1'") );
 
-	$count_ts = get_site_option( "user_count_ts" );
-	if ( time() - $count_ts > 3600 ) {
-		$count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '0' AND deleted = '0'") );
-		update_site_option( "user_count", $count );
-		update_site_option( "user_count_ts", time() );
-	}
-
-	$count = get_site_option( "user_count" );
-
+	$count = (object) $count;
+	set_site_transient( "user_count", $count );
+	
 	return $count;
 }
 
@@ -220,15 +207,20 @@
 	if ( $id == 0 )
 		$id = $wpdb->siteid;
 
-	$count_ts = get_site_option( "blog_count_ts" );
-	if ( time() - $count_ts > 3600 ) {
-		$count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(blog_id) as c FROM $wpdb->blogs WHERE site_id = %d AND spam = '0' AND deleted = '0' and archived = '0'", $id) );
-		update_site_option( "blog_count", $count );
-		update_site_option( "blog_count_ts", time() );
-	}
+	$count = get_site_transient( "blog_count" );
+	
+	if ( false !== $count )
+		return $count;
+		
+	$count['active'] = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(blog_id) as c FROM $wpdb->blogs WHERE site_id = %d AND spam = '0' AND deleted = '0' AND archived = '0'", $id) );
+	$count['all'] = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(blog_id) as c FROM $wpdb->blogs WHERE site_id = %d", $id) );
+	$count['spam'] = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(blog_id) as c FROM $wpdb->blogs WHERE site_id = %d AND spam = '1'", $id) );
+	$count['deleted'] = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(blog_id) as c FROM $wpdb->blogs WHERE site_id = %d AND deleted = '1'", $id) );
+	$count['archived'] = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(blog_id) as c FROM $wpdb->blogs WHERE site_id = %d AND archived = '1'", $id) );
 
-	$count = get_site_option( "blog_count" );
-
+	$count = (object) $count;
+	set_site_transient( "blog_count", $count );
+	
 	return $count;
 }
 
@@ -789,6 +781,8 @@
 	update_user_option($user_id, 'user_level', '');
 
 	do_action( 'wpmu_new_user', $user_id );
+	
+	delete_site_transient( "user_count" );
 
 	return $user_id;
 }
