/**
 * This function takes two sets as input and counts the number of common elements between them.
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return the number of common elements between set1 and set2
 */
fun countCommonElements(set1: Set<Any>, set2: Set<Any>): Int {

    var count = 0

    // Iterate over all elements in set1
    for (element1 in set1) {
        // Iterate over all elements in set2
        for (element2 in set2) {
            if (element1 == element2) {
                count++
            }
        }
    }

    return count
}
/**
 * This function takes two sets as input and counts the number of common elements between them.
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return the number of common elements between set1 and set2
 */
fun countCommonElements(set1: Set<Any>, set2: Set<Any>): Int {
/**
 * This function takes two sets as input and counts the number of common elements between them.
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return the number of common elements between set1 and set2
 */
fun countCommonElements(set1: Set<Any>, set2: Set<Any>): Int {

    var count = 0

    // Iterate over all elements in set1
    for (element1 in set1) {
        // Iterate over all elements in set2
        for (element2 in set2) {
            if (element1 == element2) {
                count++
            }
        }
    }

    return count
}