title: command to count occurrences of word in entire file
body: <p>I am trying to count the occurrences of a word in a file.</p>
  
  <p>If word occurs multiple times in a line, I will count is a 1.</p>
  
  <p>Following command will give me the output but will fail if line has multiple occurrences of word</p>
  
  <pre><code>grep -c "word" filename.txt
  </code></pre>
  
  <p>Is there any one liner?</p>