title: AppleScript Word Count Service
body: <p>I am trying to create a service in OSX leopard that counts the number of words of selected text. I have automator set to run an applescript, with the following put in it:</p>
  
  <pre><code>on run {input, parameters}
          count words of input
          display alert "Words: " &amp; input
          return input
  end run
  </code></pre>
  
  <p>When I compile the script, it says it cannot count every word. What am I doing wrong?</p>
  
  <p>Thanks for the help,</p>
  
  <p>Elliott</p>