/**
 * A biologist has collected two lists of animal species found in different areas.
 * The biologist wants to find the common elements between the two lists.
 * Complete the function to count the number of common elements between lst1 and lst2
 * and return the count as the output.
 *
 * @param lst1 A list of animal species found in area 1
 * @param lst2 A list of animal species found in area 2
 * @return The count of common elements between lst1 and lst2
 */
fun countCommonElements(lst1: List<String>, lst2: List<String>): Int {

    val commonElements = mutableListOf<String>() // list to store the common elements

    // Iterate through each element in lst1
    for (element in lst1) {
        // Check if the element is present in lst2
        if (element in lst2) {
            commonElements.add(element) // Add the common element to the list
        }
    }

    return commonElements.size // Count the number of common elements
}
/**
 * A biologist has collected two lists of animal species found in different areas.
 * The biologist wants to find the common elements between the two lists.
 * Complete the function to count the number of common elements between lst1 and lst2
 * and return the count as the output.
 *
 * @param lst1 A list of animal species found in area 1
 * @param lst2 A list of animal species found in area 2
 * @return The count of common elements between lst1 and lst2
 */
fun countCommonElements(lst1: List<String>, lst2: List<String>): Int {
/**
 * A biologist has collected two lists of animal species found in different areas.
 * The biologist wants to find the common elements between the two lists.
 * Complete the function to count the number of common elements between lst1 and lst2
 * and return the count as the output.
 *
 * @param lst1 A list of animal species found in area 1
 * @param lst2 A list of animal species found in area 2
 * @return The count of common elements between lst1 and lst2
 */
fun countCommonElements(lst1: List<String>, lst2: List<String>): Int {

    val commonElements = mutableListOf<String>() // list to store the common elements

    // Iterate through each element in lst1
    for (element in lst1) {
        // Check if the element is present in lst2
        if (element in lst2) {
            commonElements.add(element) // Add the common element to the list
        }
    }

    return commonElements.size // Count the number of common elements
}