/**
 * This function takes two lists as input and counts the number of common elements between them.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return The number of common elements between the two lists.
 */
fun countCommonElements(list1: List<Any>, list2: List<Any>): Int {

    var commonCount = 0

    // Iterate over each element in list1
    for (element1 in list1) {
        // Iterate over each element in list2
        for (element2 in list2) {
            // Check if the elements are equal
            if (element1 == element2) {
                commonCount++
            }
        }
    }

    return commonCount
}
/**
 * This function takes two lists as input and counts the number of common elements between them.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return The number of common elements between the two lists.
 */
fun countCommonElements(list1: List<Any>, list2: List<Any>): Int {
/**
 * This function takes two lists as input and counts the number of common elements between them.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return The number of common elements between the two lists.
 */
fun countCommonElements(list1: List<Any>, list2: List<Any>): Int {

    var commonCount = 0

    // Iterate over each element in list1
    for (element1 in list1) {
        // Iterate over each element in list2
        for (element2 in list2) {
            // Check if the elements are equal
            if (element1 == element2) {
                commonCount++
            }
        }
    }

    return commonCount
}