/**
 * Given a list of animals, return the number of pets the veterinarian has.
 *
 * @param animals List<Pair<String, String, Int>> A list containing the animals.
 * @return Int The number of pets the veterinarian has.
 *
 * Note:
 * In this exercise, pets are identified by having 4 legs.
 */
fun findNumberOfPets(animals: List<Triple<String, String, Int>>): Int {

    // Use a filter and count to find the number of pets
    val numPets = animals.count { it.second == "Pet" && it.third == 4 }
    
    return numPets
}

// Example test case
/**
 * Given a list of animals, return the number of pets the veterinarian has.
 *
 * @param animals List<Pair<String, String, Int>> A list containing the animals.
 * @return Int The number of pets the veterinarian has.
 *
 * Note:
 * In this exercise, pets are identified by having 4 legs.
 */
fun findNumberOfPets(animals: List<Triple<String, String, Int>>): Int {
/**
 * Given a list of animals, return the number of pets the veterinarian has.
 *
 * @param animals List<Pair<String, String, Int>> A list containing the animals.
 * @return Int The number of pets the veterinarian has.
 *
 * Note:
 * In this exercise, pets are identified by having 4 legs.
 */
fun findNumberOfPets(animals: List<Triple<String, String, Int>>): Int {

    // Use a filter and count to find the number of pets
    val numPets = animals.count { it.second == "Pet" && it.third == 4 }
    
    return numPets
}

// Example test case