Index: wp-admin/includes/class-wp-upgrader.php
===================================================================
--- wp-admin/includes/class-wp-upgrader.php	(revision 18157)
+++ wp-admin/includes/class-wp-upgrader.php	(working copy)
@@ -324,6 +324,10 @@
 		} else {
 			//Install Suceeded
 			$this->skin->feedback('process_success');
+			$updated = array();
+			if ( isset( $updating ) )
+				$updated[$updating] = 1;
+			echo '<script type="text/javascript">(window.parent || window).updateUpdateCounts(' . json_encode( wp_get_update_data($updated) ) . ');</script>';
 		}
 		$this->skin->after();
 
@@ -432,7 +436,8 @@
 					'clear_working' => true,
 					'hook_extra' => array(
 								'plugin' => $plugin
-					)
+					),
+					'updating' => 'plugins'
 				));
 
 		// Cleanup our hooks, incase something else does a upgrade on this connection.
@@ -544,7 +549,7 @@
 
 		return $this->result['destination_name'] . '/' . $pluginfiles[0];
 	}
-
+	
 	//Hooked to pre_install
 	function deactivate_plugin_before_upgrade($return, $plugin) {
 
@@ -679,7 +684,8 @@
 						'clear_working' => true,
 						'hook_extra' => array(
 											'theme' => $theme
-											)
+											),
+						'updating' => 'themes'
 						);
 
 		$this->run($options);
@@ -1059,6 +1065,7 @@
 class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
 	var $in_loop = false;
 	var $error = false;
+	var $updated = array( 'plugins' => 0, 'themes' => 0, 'wordpress' => 0 );
 
 	function __construct($args = array()) {
 		$defaults = array( 'url' => '', 'nonce' => '' );
@@ -1132,7 +1139,7 @@
 		$this->flush_output();
 	}
 
-	function after($title = '') {
+	function after($title = '', $updating = 'plugins') {
 		echo '</p></div>';
 		if ( $this->error || ! $this->result ) {
 			if ( $this->error )
@@ -1144,7 +1151,8 @@
 		}
 		if ( !empty($this->result) && !is_wp_error($this->result) ) {
 			echo '<div class="updated"><p>' . sprintf($this->upgrader->strings['skin_update_successful'], $title, 'jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').toggle();jQuery(\'span\', this).toggle(); return false;') . '</p></div>';
-			echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>';
+			$this->updated[$updating] ++;
+			echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide(); (window.parent || window).updateUpdateCounts(' . json_encode( wp_get_update_data($this->updated) ) . ');</script>';
 		}
 
 		$this->reset();
@@ -1211,7 +1219,7 @@
 	}
 
 	function after() {
-		parent::after($this->theme_info['Name']);
+		parent::after($this->theme_info['Name'], 'themes');
 	}
 	function bulk_footer() {
 		parent::bulk_footer();
Index: wp-admin/update.php
===================================================================
--- wp-admin/update.php	(revision 18157)
+++ wp-admin/update.php	(working copy)
@@ -54,6 +54,7 @@
 		$title = __('Update Plugin');
 		$parent_file = 'plugins.php';
 		$submenu_file = 'plugins.php';
+		wp_enqueue_script('update');
 		require_once(ABSPATH . 'wp-admin/admin-header.php');
 
 		$nonce = 'upgrade-plugin_' . $plugin;
@@ -154,6 +155,7 @@
 		$title = __('Update Theme');
 		$parent_file = 'themes.php';
 		$submenu_file = 'themes.php';
+		wp_enqueue_script('update');
 		require_once(ABSPATH . 'wp-admin/admin-header.php');
 
 		$nonce = 'upgrade-theme_' . $theme;
Index: wp-includes/admin-bar.php
===================================================================
--- wp-includes/admin-bar.php	(revision 18157)
+++ wp-includes/admin-bar.php	(working copy)
@@ -264,39 +264,14 @@
  * @since 3.1.0
  */
 function wp_admin_bar_updates_menu( $wp_admin_bar ) {
-	if ( !current_user_can('install_plugins') )
-		return;
 
-	$plugin_update_count = $theme_update_count = $wordpress_update_count = 0;
-	$update_plugins = get_site_transient( 'update_plugins' );
-	if ( !empty($update_plugins->response) )
-		$plugin_update_count = count( $update_plugins->response );
-	$update_themes = get_site_transient( 'update_themes' );
-	if ( !empty($update_themes->response) )
-		$theme_update_count = count( $update_themes->response );
-	/* @todo get_core_updates() is only available on admin page loads
-	$update_wordpress = get_core_updates( array('dismissed' => false) );
-	if ( !empty($update_wordpress) && !in_array( $update_wordpress[0]->response, array('development', 'latest') ) )
-		$wordpress_update_count = 1;
-	*/
+	$update_data = wp_get_update_data();
 
-	$update_count = $plugin_update_count + $theme_update_count + $wordpress_update_count;
-
-	if ( !$update_count )
+	if ( !$update_data['counts']['total'] )
 		return;
 
-	$update_title = array();
-	if ( $wordpress_update_count )
-		$update_title[] = sprintf(__('%d WordPress Update'), $wordpress_update_count);
-	if ( $plugin_update_count )
-		$update_title[] = sprintf(_n('%d Plugin Update', '%d Plugin Updates', $plugin_update_count), $plugin_update_count);
-	if ( $theme_update_count )
-		$update_title[] = sprintf(_n('%d Theme Update', '%d Theme Updates', $theme_update_count), $theme_update_count);
-
-	$update_title = !empty($update_title) ? esc_attr(implode(', ', $update_title)) : '';
-
-	$update_title = "<span title='$update_title'>";
-	$update_title .= sprintf( __('Updates %s'), "<span id='ab-updates' class='update-count'>" . number_format_i18n($update_count) . '</span>' );
+	$update_title = "<span title='{$update_data['title']}'>";
+	$update_title .= sprintf( __('Updates %s'), "<span id='ab-updates' class='update-count'>" . number_format_i18n($update_data['counts']['total']) . '</span>' );
 	$update_title .= '</span>';
 
 	$wp_admin_bar->add_menu( array( 'id' => 'updates', 'title' => $update_title, 'href' => network_admin_url( 'update-core.php' ) ) );
Index: wp-includes/update.php
===================================================================
--- wp-includes/update.php	(revision 18157)
+++ wp-includes/update.php	(working copy)
@@ -281,6 +281,59 @@
 	set_site_transient( 'update_themes', $new_update );
 }
 
+/*
+ * Collect counts and UI strings for available updates
+ *
+ * @package WordPress
+ * @since 3.3.0
+ *
+ * @return array
+ */
+function wp_get_update_data( $updated = array() ) {
+	$counts = array( 'plugins' => 0, 'themes' => 0, 'wordpress' => 0 );
+	$formatted = array();
+
+	if ( current_user_can( 'update_plugins' ) ) {
+		$update_plugins = get_site_transient( 'update_plugins' );
+		if ( ! empty( $update_plugins->response ) )
+			$counts['plugins'] = count( $update_plugins->response );
+		if ( ! empty( $updated['plugins'] ) && $updated['plugins'] <= $counts['plugins'] )
+			$counts['plugins'] -= $updated['plugins'];
+		$formatted['plugins'] = number_format_i18n( $counts['plugins'] );
+	}
+
+	if ( current_user_can( 'update_themes' ) ) {
+		$update_themes = get_site_transient( 'update_themes' );
+		if ( !empty($update_themes->response) )
+			$counts['themes'] = count( $update_themes->response );
+		if ( ! empty( $updated['themes'] ) && $updated['themes'] <= $counts['themes'] )
+			$counts['themes'] -= $updated['themes'];
+		$formatted['themes'] = number_format_i18n( $counts['themes'] );
+	}
+
+	if ( function_exists( 'get_core_updates' ) && current_user_can( 'update_core' ) ) {
+		$update_wordpress = get_core_updates( array('dismissed' => false) );
+		if ( !empty($update_wordpress) && !in_array( $update_wordpress[0]->response, array('development', 'latest') ) && current_user_can('update_core') )
+			$counts['wordpress'] = 1;
+		if ( ! empty( $updated['wordpress'] ) )
+			$counts['wordpress'] -= $updated['wordpress'];
+	}
+
+	$counts['total'] = $counts['plugins'] + $counts['themes'] + $counts['wordpress'];
+	$formatted['total'] = number_format_i18n( $counts['total'] );
+	$update_title = array();
+	if ( $counts['wordpress'] )
+		$update_title[] = sprintf(__('%d WordPress Update'), $counts['wordpress']);
+	if ( $counts['plugins'] )
+		$update_title[] = sprintf(_n('%d Plugin Update', '%d Plugin Updates', $counts['plugins']), $counts['plugins']);
+	if ( $counts['themes'] )
+		$update_title[] = sprintf(_n('%d Theme Update', '%d Theme Updates', $counts['themes']), $counts['themes']);
+
+	$update_title = !empty($update_title) ? esc_attr(implode(', ', $update_title)) : '';
+	
+	return array( 'counts' => $counts, 'formatted' => $formatted, 'title' => $update_title );
+}
+
 function _maybe_update_core() {
 	include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
 
Index: wp-includes/script-loader.php
===================================================================
--- wp-includes/script-loader.php	(revision 18157)
+++ wp-includes/script-loader.php	(working copy)
@@ -401,6 +401,8 @@
 			'l10n_print_after' => 'try{convertEntities(inlineEditL10n);}catch(e){};'
 		) );
 
+		$scripts->add( 'update', "/wp-admin/js/update$suffix.js", array( 'jquery' ), '20110604' );
+
 		$scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'thickbox' ), '20110113' );
 		$scripts->add_data( 'plugin-install', 'group', 1 );
 		$scripts->localize( 'plugin-install', 'plugininstallL10n', array(
Index: wp-admin/network/menu.php
===================================================================
--- wp-admin/network/menu.php	(revision 18157)
+++ wp-admin/network/menu.php	(working copy)
@@ -21,12 +21,10 @@
 $submenu['users.php'][5]  = array( __('All Users'), 'manage_network_users', 'users.php' );
 $submenu['users.php'][10]  = array( _x('Add New', 'user'), 'create_users', 'user-new.php' );
 
-if ( current_user_can( 'update_themes' ) ) {
-	$plugin_update_count = $theme_update_count = $wordpress_update_count = 0;
-	$update_themes = get_site_transient( 'update_themes' );
-	if ( !empty($update_themes->response) )
-		$theme_update_count = count( $update_themes->response );
-	$menu[15] = array(sprintf( __( 'Themes %s' ), "<span class='update-plugins count-$theme_update_count'><span class='theme-count'>" . number_format_i18n( $theme_update_count ) . "</span></span>" ), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div' );
+$update_data = wp_get_update_data();
+
+if ( $update_data['counts']['themes'] ) {
+	$menu[15] = array(sprintf( __( 'Themes %s' ), "<span class='update-plugins count-{$update_data['counts']['themes']}'><span class='theme-count'>" . number_format_i18n( $update_data['counts']['themes'] ) . "</span></span>" ), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div' );
 } else {
 	$menu[15] = array( __( 'Themes' ), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div' );
 }
@@ -35,10 +33,7 @@
 $submenu['themes.php'][15] = array( _x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php' );
 
 if ( current_user_can( 'update_plugins' ) ) {
-	$update_plugins = get_site_transient( 'update_plugins' );
-	if ( !empty($update_plugins->response) )
-		$plugin_update_count = count( $update_plugins->response );
-	$menu[20] = array( sprintf( __( 'Plugins %s' ), "<span class='update-plugins count-$plugin_update_count'><span class='plugin-count'>" . number_format_i18n( $plugin_update_count ) . "</span></span>" ), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'div');
+	$menu[20] = array( sprintf( __( 'Plugins %s' ), "<span class='update-plugins count-{$update_data['counts']['plugins']}'><span class='plugin-count'>" . number_format_i18n( $update_data['counts']['plugins'] ) . "</span></span>" ), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'div');
 } else {
 	$menu[20] = array( __('Plugins'), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'div' );
 }
@@ -53,32 +48,17 @@
 	$submenu['settings.php'][10] = array( __('Network Setup'), 'manage_network_options', 'setup.php' );
 }
 
-if ( current_user_can( 'update_core' ) ) {
-	$update_wordpress = get_core_updates( array('dismissed' => false) );
-	if ( !empty($update_wordpress) && !in_array( $update_wordpress[0]->response, array('development', 'latest') ) )
-		$wordpress_update_count = 1;
-	
-	$update_count = $plugin_update_count + $theme_update_count + $wordpress_update_count;
-	$update_title = array();
-	if ( $wordpress_update_count )
-		$update_title[] = sprintf(__('%d WordPress Update'), $wordpress_update_count);
-	if ( $plugin_update_count )
-		$update_title[] = sprintf(_n('%d Plugin Update', '%d Plugin Updates', $plugin_update_count), $plugin_update_count);
-	if ( $theme_update_count )
-		$update_title[] = sprintf(_n('%d Theme Update', '%d Theme Updates', $theme_update_count), $theme_update_count);
-	
-	$update_title = !empty($update_title) ? esc_attr(implode(', ', $update_title)) : '';
-	
-	$menu[30] = array( sprintf( __( 'Updates %s' ), "<span class='update-plugins count-$update_count' title='$update_title'><span class='update-count'>" . number_format_i18n($update_count) . "</span></span>" ), 'manage_network', 'upgrade.php', '', 'menu-top menu-icon-tools', 'menu-update', 'div' );
+if ( $update_data['counts']['total'] ) {
+	$menu[30] = array( sprintf( __( 'Updates %s' ), "<span class='update-plugins count-{$update_data['counts']['total']}' title='{$update_data['title']}'><span class='update-count'>" . number_format_i18n($update_data['counts']['total']) . "</span></span>" ), 'manage_network', 'upgrade.php', '', 'menu-top menu-icon-tools', 'menu-update', 'div' );
 } else {
 	$menu[30] = array( __( 'Updates' ), 'manage_network', 'upgrade.php', '', 'menu-top menu-icon-tools', 'menu-update', 'div' );
 }
 
+unset($update_data);
+
 $submenu[ 'upgrade.php' ][10] = array( __( 'Available Updates' ), 'update_core',  'update-core.php' );
 $submenu[ 'upgrade.php' ][15] = array( __( 'Update Network' ), 'manage_network', 'upgrade.php' );
-unset($plugin_update_count, $theme_update_count, $wordpress_update_count, $update_count, $update_title, $update_themes, $update_plugins, $update_wordpress);
 
-
 $menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator-last' );
 
 require_once(ABSPATH . 'wp-admin/includes/menu.php');
Index: wp-admin/menu.php
===================================================================
--- wp-admin/menu.php	(revision 18157)
+++ wp-admin/menu.php	(working copy)
@@ -30,45 +30,13 @@
 	$submenu[ 'index.php' ][5] = array( __('My Sites'), 'read', 'my-sites.php' );
 }
 
-if ( ! is_multisite() || is_super_admin() ) {
-	$plugin_update_count = $theme_update_count = $wordpress_update_count = 0;
+if ( ! is_multisite() || is_super_admin() )
+	$update_data = wp_get_update_data();
 
-	if ( current_user_can( 'update_plugins' ) ) {
-		$update_plugins = get_site_transient( 'update_plugins' );
-		if ( ! empty( $update_plugins->response ) )
-			$plugin_update_count = count( $update_plugins->response );
-	}
-
-	if ( current_user_can( 'update_themes' ) ) {
-		$update_themes = get_site_transient( 'update_themes' );
-		if ( !empty($update_themes->response) )
-			$theme_update_count = count( $update_themes->response );
-	}
-
-	if ( current_user_can( 'update_core' ) ) {
-		$update_wordpress = get_core_updates( array('dismissed' => false) );
-		if ( !empty($update_wordpress) && !in_array( $update_wordpress[0]->response, array('development', 'latest') ) && current_user_can('update_core') )
-			$wordpress_update_count = 1;
-	}
-
-	$total_update_count = $plugin_update_count + $theme_update_count + $wordpress_update_count;
-	$update_title = array();
-	if ( $wordpress_update_count )
-		$update_title[] = sprintf(__('%d WordPress Update'), $wordpress_update_count);
-	if ( $plugin_update_count )
-		$update_title[] = sprintf(_n('%d Plugin Update', '%d Plugin Updates', $plugin_update_count), $plugin_update_count);
-	if ( $theme_update_count )
-		$update_title[] = sprintf(_n('%d Theme Update', '%d Theme Updates', $theme_update_count), $theme_update_count);
-
-	$update_title = !empty($update_title) ? esc_attr(implode(', ', $update_title)) : '';
-}
-
 if ( ! is_multisite() ) {
-	$submenu[ 'index.php' ][10] = array( sprintf( __('Updates %s'), "<span class='update-plugins count-$total_update_count' title='$update_title'><span class='update-count'>" . number_format_i18n($total_update_count) . "</span></span>" ), 'update_core',  'update-core.php');
+	$submenu[ 'index.php' ][10] = array( sprintf( __('Updates %s'), "<span class='update-plugins count-{$update_data['counts']['total']}' title='{$update_data['title']}'><span class='update-count'>" . number_format_i18n($update_data['counts']['total']) . "</span></span>" ), 'update_core',  'update-core.php');
 }
 
-unset($theme_update_count, $wordpress_update_count, $update_themes, $update_plugins, $update_wordpress);
-
 $menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );
 
 $menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'open-if-no-js menu-top menu-icon-post', 'menu-posts', 'div' );
@@ -176,7 +144,10 @@
 
 $menu_perms = get_site_option('menu_items', array());
 if ( ! is_multisite() || is_super_admin() || ! empty( $menu_perms['plugins'] ) ) {
-	$count = "<span class='update-plugins count-$plugin_update_count'><span class='plugin-count'>" . number_format_i18n($plugin_update_count) . "</span></span>";
+	if ( !isset( $update_data ) )
+		$update_data = wp_get_update_data();
+
+	$count = "<span class='update-plugins count-{$update_data['counts']['plugins']}'><span class='plugin-count'>" . number_format_i18n($update_data['counts']['plugins']) . "</span></span>";
 	if ( is_multisite() || ! current_user_can( 'update_plugins' ) )
 		$count = '';
 	$menu[65] = array( sprintf( __('Plugins %s'), $count ), 'activate_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'div' );
@@ -189,7 +160,7 @@
 			$submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' );
 		}
 }
-unset($menu_perms, $update_plugins, $plugin_update_count);
+unset($menu_perms, $update_data);
 
 if ( current_user_can('list_users') )
 	$menu[70] = array( __('Users'), 'list_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'div' );
Index: wp-admin/update-core.php
===================================================================
--- wp-admin/update-core.php	(revision 18157)
+++ wp-admin/update-core.php	(working copy)
@@ -395,6 +395,8 @@
 	$action = 'upgrade-core';
 }
 
+wp_enqueue_script( 'update' );
+
 $title = __('WordPress Updates');
 $parent_file = 'tools.php';
 
Index: wp-admin/js/update.dev.js
===================================================================
--- wp-admin/js/update.dev.js	(revision 0)
+++ wp-admin/js/update.dev.js	(revision 0)
@@ -0,0 +1,21 @@
+/**
+ * Updater JS functions
+ *
+ * @version 3.3.0
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+function updateUpdateCounts( data ) {
+	var $ = jQuery, upgradeData;
+
+	updateData = ( typeof data == 'string' ) ? $.parseJson( data ) : data;
+	
+	// @todo fix parent span class count-%d values
+	$('#ab-updates, .update-count').text( updateData.formatted.total ).parent()
+		.attr( 'title', updateData.title )
+		.addClass( 'count-' + updateData.counts.total );
+	$('.plugin-count').text( updateData.formatted.plugins ).parent()
+		.addClass( 'count-' + updateData.counts.plugins );
+}
