/**
 * Given two sets, returns the count of elements that are present in both sets.
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return The count of elements that are common to both sets.
 */
fun intersectionCount(set1: Set<Any>, set2: Set<Any>): Int {

    val commonElements = mutableSetOf<Any>()

    // Iterate over each element in the first set
    for (element in set1) {
        // Check if the element is in the second set
        if (element in set2) {
            // Add the element to the commonElements set
            commonElements.add(element)
        }
    }

    return commonElements.size
}
/**
 * Given two sets, returns the count of elements that are present in both sets.
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return The count of elements that are common to both sets.
 */
fun intersectionCount(set1: Set<Any>, set2: Set<Any>): Int {
/**
 * Given two sets, returns the count of elements that are present in both sets.
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return The count of elements that are common to both sets.
 */
fun intersectionCount(set1: Set<Any>, set2: Set<Any>): Int {

    val commonElements = mutableSetOf<Any>()

    // Iterate over each element in the first set
    for (element in set1) {
        // Check if the element is in the second set
        if (element in set2) {
            // Add the element to the commonElements set
            commonElements.add(element)
        }
    }

    return commonElements.size
}