How do I count the number of occurrences of a list of items in another .txt file?
<p>I have a list of words and I want to find how many times they occur in a .txt file.  The word list is something like as follows:</p>

<pre><code>wordlist = ['cup', 'bike', 'run']
</code></pre>

<p>I want to be able to not only pick up these words, but also things like CUP, biker, running, Cups, etc.  So I think I need a regular expression.  Here is what I was thinking but it doesn't work:</p>

<pre><code>len(re.findall(wordlist, filename, re.I))
</code></pre>

<p>Thanks in advance!</p>
