/**
 * This function takes a list of animals observed by a zoologist and an animal type,
 * and returns the count of that animal type in the list.
 *
 * @param animalList A list of animals observed by the zoologist
 * @param animalType The animal type to count in the list
 * @return The count of the given animal type in the list
 */
fun countAnimals(animalList: List<String>, animalType: String): Int {

    var count = 0
    var index = 0

    while (index < animalList.size) {
        // Check if the current animal is of the given animalType
        if (animalList[index].equals(animalType, ignoreCase = true)) {
            count++
        }
        
        // Increment the index
        index++
    }

    return count
}
/**
 * This function takes a list of animals observed by a zoologist and an animal type,
 * and returns the count of that animal type in the list.
 *
 * @param animalList A list of animals observed by the zoologist
 * @param animalType The animal type to count in the list
 * @return The count of the given animal type in the list
 */
fun countAnimals(animalList: List<String>, animalType: String): Int {
/**
 * This function takes a list of animals observed by a zoologist and an animal type,
 * and returns the count of that animal type in the list.
 *
 * @param animalList A list of animals observed by the zoologist
 * @param animalType The animal type to count in the list
 * @return The count of the given animal type in the list
 */
fun countAnimals(animalList: List<String>, animalType: String): Int {

    var count = 0
    var index = 0

    while (index < animalList.size) {
        // Check if the current animal is of the given animalType
        if (animalList[index].equals(animalType, ignoreCase = true)) {
            count++
        }
        
        // Increment the index
        index++
    }

    return count
}