/**
 * This function counts the number of characters that are common among all the words in a list of words.
 * @param characters a string of characters representing the input string
 * @param words a list of strings representing the words
 * @return the count of common characters among all the words
 */
fun countIntersection(characters: String, words: List<String>): Int {

    var count = 0

    for (char in characters) {
        var foundInAllWords = true
        for (word in words) {
            if (char !in word) {
                foundInAllWords = false
                break
            }
        }
        if (foundInAllWords) {
            count++
        }
    }

    return count
}
/**
 * This function counts the number of characters that are common among all the words in a list of words.
 * @param characters a string of characters representing the input string
 * @param words a list of strings representing the words
 * @return the count of common characters among all the words
 */
fun countIntersection(characters: String, words: List<String>): Int {
/**
 * This function counts the number of characters that are common among all the words in a list of words.
 * @param characters a string of characters representing the input string
 * @param words a list of strings representing the words
 * @return the count of common characters among all the words
 */
fun countIntersection(characters: String, words: List<String>): Int {

    var count = 0

    for (char in characters) {
        var foundInAllWords = true
        for (word in words) {
            if (char !in word) {
                foundInAllWords = false
                break
            }
        }
        if (foundInAllWords) {
            count++
        }
    }

    return count
}