/**
 * Given two lists, return the count of elements that are common to both lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return The count of common elements between the two lists.
 */
fun countCommonElements(list1: List<Any>, list2: List<Any>): Int {

    val commonElements = list1.toSet() intersect list2.toSet()

    // Write your code here to complete the exercise

    return commonElements.size
}
/**
 * Given two lists, return the count of elements that are common to both lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return The count of common elements between the two lists.
 */
fun countCommonElements(list1: List<Any>, list2: List<Any>): Int {
/**
 * Given two lists, return the count of elements that are common to both lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return The count of common elements between the two lists.
 */
fun countCommonElements(list1: List<Any>, list2: List<Any>): Int {

    val commonElements = list1.toSet() intersect list2.toSet()

    // Write your code here to complete the exercise

    return commonElements.size
}