str_ = 'How many words in this string are from dict1'
dict_1 = dict(a='many', b='words')
len([x for x in str_.split() if x in list(dict_1.values())])
Count the number of words in a string by using a dictionary using a csv file in Python