/**
 * Given a list of room elements, count the number of occurrences of a specific element.
 *
 * @param roomList A list of room elements.
 * @param element The element to be counted.
 * @return The number of occurrences of the element in the roomList.
 *
 * Example:
 * countElements(listOf("chair", "table", "chair", "cushion"), "chair")
 * Output: 2
 */
fun countElements(roomList: List<String>, element: String): Int {

    var count = 0
    for (item in roomList) {
        if (item == element) {
            count++
        }
    }
    return count
}
/**
 * Given a list of room elements, count the number of occurrences of a specific element.
 *
 * @param roomList A list of room elements.
 * @param element The element to be counted.
 * @return The number of occurrences of the element in the roomList.
 *
 * Example:
 * countElements(listOf("chair", "table", "chair", "cushion"), "chair")
 * Output: 2
 */
fun countElements(roomList: List<String>, element: String): Int {
/**
 * Given a list of room elements, count the number of occurrences of a specific element.
 *
 * @param roomList A list of room elements.
 * @param element The element to be counted.
 * @return The number of occurrences of the element in the roomList.
 *
 * Example:
 * countElements(listOf("chair", "table", "chair", "cushion"), "chair")
 * Output: 2
 */
fun countElements(roomList: List<String>, element: String): Int {

    var count = 0
    for (item in roomList) {
        if (item == element) {
            count++
        }
    }
    return count
}