You can try
The -w option matches the whole word only, -c counts the matching lines and the double quotes are escaped to let the shell interpret them literally. Note that -c count the matching lines, not the matching words: this means that if two or more strings "out" appear in the same line, they are counted as one.
Edit: to count the actual number of words you can split the file by putting each word on a different line. This can be easily accomplished by a small awk program and passing output to the grep command, for example:
awk -v OFS='\n' '$1=$1' ./log20090831.txt | grep -w -c \"out\"