title: Count occurrences of a couple of specific words
body: <p>I have a list of words, lets say: ["foo", "bar", "baz"] and a large string in which these words may occur. </p>
  
  <p>I now use for every word in the list the "string".count("word") method. This works OK, but seems rather inefficient. For every extra word added to the list the entire string must be iterated over an extra time. </p>
  
  <p>Is their any better method to do this, or should I implement a custom method which iterates over the large string a single time, checking for each character if one of the words in the list has been reached?</p>
  
  <p>To be clear: </p>
  
  <ul>
  <li>I want the number of occurrences per word in the list.</li>
  <li>The string to search in is different each time and consists of about 10000 chars  </li>
  <li>The list of words is constant </li>
  <li>The words in the list of words can contain whitespace</li>
  </ul>