You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: a.go
    path of file: ./repos/codeforces-go/leetcode/biweekly/66/a
    
    the code of the file until where you have to start completion: package main

// github.com/EndlessCheng/codeforces-go
func countWords(words1, 
    
func countWords(words1, words2 []string) (ans int) {
	cnt1 := map[string]int{}
	cnt2 := map[string]int{}
	for _, s := range words1 { cnt1[s]++ } // 统计单词出现次数
	for _, s := range words2 { cnt2[s]++ } // 统计单词出现次数
	for _, s := range words2 { if cnt1[s] == 1 && cnt2[s] == 1 { ans++ }} // 单词都恰好出现一次
	return
}