From http://organognosi.blogspot.com.es/2011/04/count-words-of-pdf-file-from-skim.html