/**
 * This function counts the number of animals in a given list that belong to certain categories.
 *
 * @param animals A list of animals.
 * @param categories A list of categories to check.
 * @return The number of animals that belong to the specified categories.
 */
fun countAnimals(animals: List<String>, categories: List<String>): Int {

    var count = 0

    for (animal in animals) {
        if (categories.any { category -> animal.contains(category) }) {
            count++
        }
    }

    return count
}
/**
 * This function counts the number of animals in a given list that belong to certain categories.
 *
 * @param animals A list of animals.
 * @param categories A list of categories to check.
 * @return The number of animals that belong to the specified categories.
 */
fun countAnimals(animals: List<String>, categories: List<String>): Int {
/**
 * This function counts the number of animals in a given list that belong to certain categories.
 *
 * @param animals A list of animals.
 * @param categories A list of categories to check.
 * @return The number of animals that belong to the specified categories.
 */
fun countAnimals(animals: List<String>, categories: List<String>): Int {

    var count = 0

    for (animal in animals) {
        if (categories.any { category -> animal.contains(category) }) {
            count++
        }
    }

    return count
}