/**
 * This exercise aims to test your understanding of list methods and the 'in' operator.
 * You need to add code to the function to count the number of common elements between
 * two given lists.
 *
 * @param list1 The first list
 * @param list2 The second list
 * @return The number of common elements between list1 and list2
 */
fun countCommonElements(list1: List<Any>, list2: List<Any>): Int {

    var count = 0

    for (element in list1) {
        if (element in list2) {
            count++
        }
    }

    return count
}
/**
 * This exercise aims to test your understanding of list methods and the 'in' operator.
 * You need to add code to the function to count the number of common elements between
 * two given lists.
 *
 * @param list1 The first list
 * @param list2 The second list
 * @return The number of common elements between list1 and list2
 */
fun countCommonElements(list1: List<Any>, list2: List<Any>): Int {
/**
 * This exercise aims to test your understanding of list methods and the 'in' operator.
 * You need to add code to the function to count the number of common elements between
 * two given lists.
 *
 * @param list1 The first list
 * @param list2 The second list
 * @return The number of common elements between list1 and list2
 */
fun countCommonElements(list1: List<Any>, list2: List<Any>): Int {

    var count = 0

    for (element in list1) {
        if (element in list2) {
            count++
        }
    }

    return count
}