File=open('文本.txt',encoding='utf-8')
#讀取全部內容
s=File.readlines()
#轉化成字符串
s=str(s)
#統計'NN'的數量
NN=len(re.findall(r"'NN'",s))
print(NN)