Index: wp-admin/edit-form-advanced.php
===================================================================
--- wp-admin/edit-form-advanced.php	(revision 7765)
+++ wp-admin/edit-form-advanced.php	(working copy)
@@ -157,6 +157,7 @@
 <br class="clear" />
 <?php endif; ?>
 <span id="autosave"></span>
+<span id="wp-word-count"></span>
 </p>
 
 <div class="side-info">
Index: wp-admin/edit-page-form.php
===================================================================
--- wp-admin/edit-page-form.php	(revision 7765)
+++ wp-admin/edit-page-form.php	(working copy)
@@ -140,6 +140,7 @@
 <br class="clear" />
 <?php endif; ?>
 <span id="autosave"></span>
+<span id="wp-word-count"></span>
 </p>
 
 <div class="side-info">
Index: wp-admin/js/word-count.js
===================================================================
--- wp-admin/js/word-count.js	(revision 0)
+++ wp-admin/js/word-count.js	(revision 0)
@@ -0,0 +1,47 @@
+// Word count
+(function(JQ) {
+	wpWordCount = {
+	
+		init : function() {
+    		var t = this, last = 0, co = JQ('#content');
+			
+			JQ('#wp-word-count').html( wordCountL10n.count.replace( /%d/, '<span id="word-count">0</span>' ) );
+    		t.block = 0;
+			t.wc(co.val());
+			co.keyup( function(e) {	
+        		if ( e.keyCode == last ) return true;
+            	if ( 13 == e.keyCode || 8 == last ) t.wc(co.val());
+            	else if ( 32 == last ) t.fwc();
+            	last = e.keyCode;
+        		return true;
+    		});
+    	},
+
+    	wc : function(text) {
+    		var t = this, w = JQ('#word-count'), co = JQ('#content');
+
+			if ( t.block ) return;
+        	t.block = 1;
+
+        	setTimeout( function() {
+            	var tx = JQ.trim(text), tc = 0;
+
+            	if ( tx ) {
+                    tx = tx.replace( /<.[^<>]*?>/g, ' ' ) + ' ';
+                    tx = tx.replace( /[^A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\xff ]*/g, '' );
+                    tx.replace( /\S\s+/g, function(){tc++;} );
+            	}
+            	w.html(tc.toString());
+
+            	setTimeout( function() { t.block = 0; }, 2000 );
+        	}, 1 );
+    	},
+    	
+    	fwc : function() {
+        	var w = JQ('#word-count'), tc = parseInt(w.text()) + 1;
+        	w.html( tc.toString() );
+    	}
+	} 
+}(jQuery));
+
+jQuery(document).ready( function(){ wpWordCount.init(); } );
Index: wp-admin/page-new.php
===================================================================
--- wp-admin/page-new.php	(revision 7765)
+++ wp-admin/page-new.php	(working copy)
@@ -9,6 +9,7 @@
 	wp_enqueue_script('editor');
 wp_enqueue_script('thickbox');
 wp_enqueue_script('media-upload');
+wp_enqueue_script('word-count');
 
 require_once('admin-header.php');
 ?>
Index: wp-admin/page.php
===================================================================
--- wp-admin/page.php	(revision 7765)
+++ wp-admin/page.php	(working copy)
@@ -83,6 +83,7 @@
 		wp_enqueue_script('editor');
 	wp_enqueue_script('thickbox');
 	wp_enqueue_script('media-upload');
+	wp_enqueue_script('word-count');
 	if ( $last = wp_check_post_lock( $post->ID ) ) {
 		$last_user = get_userdata( $last );
 		$last_user_name = $last_user ? $last_user->display_name : __('Somebody');
Index: wp-admin/post-new.php
===================================================================
--- wp-admin/post-new.php	(revision 7765)
+++ wp-admin/post-new.php	(working copy)
@@ -9,6 +9,7 @@
 	wp_enqueue_script('editor');
 wp_enqueue_script('thickbox');
 wp_enqueue_script('media-upload');
+wp_enqueue_script('word-count');
 
 require_once ('./admin-header.php');
 
Index: wp-admin/post.php
===================================================================
--- wp-admin/post.php	(revision 7765)
+++ wp-admin/post.php	(working copy)
@@ -90,6 +90,7 @@
 		wp_enqueue_script('editor');
 	wp_enqueue_script('thickbox');
 	wp_enqueue_script('media-upload');
+	wp_enqueue_script('word-count');
 	if ( $last = wp_check_post_lock( $post->ID ) ) {
 		$last_user = get_userdata( $last );
 		$last_user_name = $last_user ? $last_user->display_name : __('Somebody');
Index: wp-admin/wp-admin.css
===================================================================
--- wp-admin/wp-admin.css	(revision 7765)
+++ wp-admin/wp-admin.css	(working copy)
@@ -1503,3 +1503,7 @@
 table.diff .diff-deletedline del, table.diff .diff-addedline ins {
 	text-decoration: none;
 }
+
+#wp-word-count {
+	display: block;
+}
Index: wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js
===================================================================
--- wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js	(revision 7765)
+++ wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js	(working copy)
@@ -132,6 +132,17 @@
 				}
 			});
 
+			// Word count if script is loaded
+			if ( 'undefined' != typeof wpWordCount ) {
+				var last = 0;
+				ed.onKeyUp.add(function(ed, e) {
+					if ( e.keyCode == last ) return;
+					if ( 13 == e.keyCode || 8 == last ) wpWordCount.wc( ed.getContent({format : 'raw'}) );
+					else if ( 32 == last ) wpWordCount.fwc();
+					last = e.keyCode;
+				});
+			};
+
 			// Add listeners to handle more break
 			t._handleMoreBreak(ed, url);
 
Index: wp-includes/js/tinymce/tiny_mce_config.php
===================================================================
--- wp-includes/js/tinymce/tiny_mce_config.php	(revision 7765)
+++ wp-includes/js/tinymce/tiny_mce_config.php	(working copy)
@@ -223,7 +223,7 @@
 // Setup cache info
 if ( $disk_cache ) {
 
-	$cacheKey = apply_filters('tiny_mce_version', '20080414');
+	$cacheKey = apply_filters('tiny_mce_version', '20080421');
 
 	foreach ( $initArray as $v )
 		$cacheKey .= $v;
Index: wp-includes/script-loader.php
===================================================================
--- wp-includes/script-loader.php	(revision 7765)
+++ wp-includes/script-loader.php	(working copy)
@@ -36,7 +36,7 @@
 		$this->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080325' );
 
 		// Modify this version when tinyMCE plugins are changed.
-		$mce_version = apply_filters('tiny_mce_version', '20080414');
+		$mce_version = apply_filters('tiny_mce_version', '20080421');
 		$this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version );
 
 		$this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');
@@ -193,7 +193,11 @@
 				'edit' => __('Edit'),
 				'cancel' => __('Cancel'),
 			));
-			$this->add( 'editor', '/wp-admin/js/editor.js', array('tiny_mce'), '20080221' );
+
+			$this->add( 'word-count', '/wp-admin/js/word-count.js', array( 'jquery' ), '20080416' );
+			$this->localize( 'word-count', 'wordCountL10n', array(
+				'count' => __('Word count: %d')
+			));
 		}
 	}
 
