/**
 * This function takes in a list of customer orders and a list of customer names,
 * and returns the count of customers who have placed an order.
 *
 * @param orderList a list containing the orders placed by customers
 * @param customerList a list containing the names of the customers
 * @return the count of customers who have placed an order
 */
fun countCustomers(orderList: List<Map<String, String>>, customerList: List<String>): Int {

    // Create an empty set to store unique customer names
    val uniqueCustomers = mutableSetOf<String>()

    // Iterate over each order in the order list
    for (order in orderList) {
        // Extract the customer name from the order
        val customerName = order["customer"]
        // Add the customer name to the set of unique customers
        customerName?.let { uniqueCustomers.add(it) }
    }

    // Create a variable to keep track of the count
    var count = 0

    // Iterate over each customer in the customer list
    for (customer in customerList) {
        // Check if the customer is in the set of unique customers
        if (customer in uniqueCustomers) {
            // Increment the count if the customer has placed an order
            count++
        }
    }

    return count
}
/**
 * This function takes in a list of customer orders and a list of customer names,
 * and returns the count of customers who have placed an order.
 *
 * @param orderList a list containing the orders placed by customers
 * @param customerList a list containing the names of the customers
 * @return the count of customers who have placed an order
 */
fun countCustomers(orderList: List<Map<String, String>>, customerList: List<String>): Int {
/**
 * This function takes in a list of customer orders and a list of customer names,
 * and returns the count of customers who have placed an order.
 *
 * @param orderList a list containing the orders placed by customers
 * @param customerList a list containing the names of the customers
 * @return the count of customers who have placed an order
 */
fun countCustomers(orderList: List<Map<String, String>>, customerList: List<String>): Int {

    // Create an empty set to store unique customer names
    val uniqueCustomers = mutableSetOf<String>()

    // Iterate over each order in the order list
    for (order in orderList) {
        // Extract the customer name from the order
        val customerName = order["customer"]
        // Add the customer name to the set of unique customers
        customerName?.let { uniqueCustomers.add(it) }
    }

    // Create a variable to keep track of the count
    var count = 0

    // Iterate over each customer in the customer list
    for (customer in customerList) {
        // Check if the customer is in the set of unique customers
        if (customer in uniqueCustomers) {
            // Increment the count if the customer has placed an order
            count++
        }
    }

    return count
}