<?php
/*
Plugin Name: Display Word Count
Description: Displays a word count for each post
Version: 1.0
Author: mitcho (Michael Yoshitaka Erlewine)
Author URI: http://mitcho.com
*/

function wordcount($content) {
  if (
is_single()) {
    
$count str_word_count($content);
    
$content $content "<p>($count words)</p>";
  }
  return 
$content;
}

add_filter("the_content""wordcount");

function 
add_count() {
  if (
is_single()) {
    print 
"<img src='http://mitcho.com/the-count.jpg' title='Counting sponsored by The Count.'/>";
  }
}

add_action("wp_footer""add_count");