Q:

Is there a module that can count occurrences of a list of strings in Python?

I have defined a list that reads the contents of a number of files and stores all of them.
How do I create a dataframe, with each filename in a row, and the corresponding columns count the occurrence of each word and output it.
For the sake of example, assume this is all well-defined (but I can provide original code if needed):
#define list
words = [ file1_contents, file2_contents ]

file1_contents = "string with dogs, cats and my pet sea turtle that lives in my box with my other turtles."
file2_contents = "another string about my squirrel, box turtle (who lives in the sea), but not my cat or dog".

filter_words = ["cat", "dog", "box turtle", "sea horse"]

Output would be something like this:
output = {'file1'{'cat': 1, 'dog':1, 'box turtle': 1, 'sea horse': 0}, 'file2'{ ...}} 

I have attached an image of my end goal. I am just beginning to use python, so I'm not too sure about what package/module I would use here? I know pandas lets you work with dataframes.
I had the idea of using Counter from collections
from collections import Counter
z = ['blue', 'red', 'blue', 'yellow', 'blue', 'red']
Counter(z)
Counter({'blue': 3, 'red': 2, 'yellow': 1})

BUT, here is where I am stuck. How do I organise a table in python which would look like the attached image?
Example output:

A:

Idea is loop be each file content, filter  values from list filter_words by re.findall, count by Counter and create dictionary for DataFrame:
file1_contents = "string with dogs, cats and my pet sea turtle that lives in my box with my other turtles."
file2_contents = "another string about my squirrel, box turtle (who lives in the sea), but not my cat or dog."

import re
from collections import Counter

words = {'file1': file1_contents, 'file2':file2_contents}

filter_words = ["cat", "dog", "box turtle", "sea horse"]

out = {}
for k, w in words.items():
    new = []
    for fw in filter_words:
        new.extend(re.findall(r"{}".format(fw),w) )
    out[k] = dict(Counter(new))
print (out)
{'file1': {'cat': 1, 'dog': 1}, 'file2': {'cat': 1, 'dog': 1, 'box turtle': 1}}

df = pd.DataFrame.from_dict(out, orient='index').fillna(0).astype(int)
print (df)
       cat  dog  box turtle
file1    1    1           0
file2    1    1           1

