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: 1160. Find Words That Can Be Formed by Characters.go
    path of file: ./repos/LeetCode-Go/leetcode/1160.Find-Words-That-Can-Be-Formed-by-Characters
    
    the code of the file until where you have to start completion: package leetcode

func countCharacters(words []string, chars string) int {
	count, res := make([]int, 26), 0
	for i := 0; i < len(chars); i++ {
		count[c
    
func countCharacters(words []string, chars string) int {
	count, res := make([]int, 26), 0
	for i := 0; i < len(chars); i++ {
		count[chars[i]-'a']++
	}
	for _, w := range words {
		if canBeFormed(w, count) {
			res += len(w)
		}
	}
	return res
}