/**
 * Given a list of customers and a city name, count the number of customers who live in that city.
 *
 * @param customers List of customers where each element is a Pair consisting of a customer's name and the city they live in.
 * @param city The city name to search for in the customers list.
 * @return The count of customers who live in the specified city.
 *
 * Example:
 * countCustomersInCity(listOf("John Smith" to "New York", "Jane Johnson" to "Los Angeles", "Mike Davis" to "New York"), "New York")
 * Output: 2
 */
fun countCustomersInCity(customers: List<Pair<String, String>>, city: String): Int {

    var count = 0
    for (customer in customers) {
        if (customer.second == city) {
            count++
        }
    }
    return count
}
/**
 * Given a list of customers and a city name, count the number of customers who live in that city.
 *
 * @param customers List of customers where each element is a Pair consisting of a customer's name and the city they live in.
 * @param city The city name to search for in the customers list.
 * @return The count of customers who live in the specified city.
 *
 * Example:
 * countCustomersInCity(listOf("John Smith" to "New York", "Jane Johnson" to "Los Angeles", "Mike Davis" to "New York"), "New York")
 * Output: 2
 */
fun countCustomersInCity(customers: List<Pair<String, String>>, city: String): Int {
/**
 * Given a list of customers and a city name, count the number of customers who live in that city.
 *
 * @param customers List of customers where each element is a Pair consisting of a customer's name and the city they live in.
 * @param city The city name to search for in the customers list.
 * @return The count of customers who live in the specified city.
 *
 * Example:
 * countCustomersInCity(listOf("John Smith" to "New York", "Jane Johnson" to "Los Angeles", "Mike Davis" to "New York"), "New York")
 * Output: 2
 */
fun countCustomersInCity(customers: List<Pair<String, String>>, city: String): Int {

    var count = 0
    for (customer in customers) {
        if (customer.second == city) {
            count++
        }
    }
    return count
}