word_list = ['hello', 'wonderful', 'good', 'flawless', 'perfect']
test = ['abc', 'hello', 'vbf', 'good', 'dfdfdf', 'good', 'good']
result = []
word_map = {}
for w in test:
    if w in word_map:
        word_map[w] += 1
else:
    word_map[w] = 1
for w in word_list:
    result.append(word_map.get(w, 0))
print(result)
Python count element occurrence of list1 in list2