/**
 * Given a dictionary, count the number of occurrences of a specific item.
 *
 * @param dictionary A dictionary containing various items.
 * @return The count of occurrences of a specific item in the given dictionary.
 */
fun countItems(dictionary: Map<String, String>) {

    // Step 1: Initialize a counter variable to keep track of the occurrences
    var count = 0

    // Step 2: Prompt the user to enter the item to count
    print("Enter the item to count: ")
    val itemToCount = readLine()

    // Step 3: Iterate over the dictionary and count the occurrences of the item
    for ((_, value) in dictionary) {
        if (value == itemToCount) {
            count++
        }
    }

    // Step 4: Print the count
    println("The count of '$itemToCount' is $count.")
}

// Example usage
/**
 * Given a dictionary, count the number of occurrences of a specific item.
 *
 * @param dictionary A dictionary containing various items.
 * @return The count of occurrences of a specific item in the given dictionary.
 */
fun countItems(dictionary: Map<String, String>) {
/**
 * Given a dictionary, count the number of occurrences of a specific item.
 *
 * @param dictionary A dictionary containing various items.
 * @return The count of occurrences of a specific item in the given dictionary.
 */
fun countItems(dictionary: Map<String, String>) {

    // Step 1: Initialize a counter variable to keep track of the occurrences
    var count = 0

    // Step 2: Prompt the user to enter the item to count
    print("Enter the item to count: ")
    val itemToCount = readLine()

    // Step 3: Iterate over the dictionary and count the occurrences of the item
    for ((_, value) in dictionary) {
        if (value == itemToCount) {
            count++
        }
    }

    // Step 4: Print the count
    println("The count of '$itemToCount' is $count.")
}

// Example usage