/**
 * This function takes in a list of elements and a target element, and returns the number of occurrences of the target
 * element in the list.
 *
 * @param listData A list of elements.
 * @param target The target element to count the occurrences.
 * @return The count of occurrences of the target element in the list.
 */
fun countOccurrences(listData: List<Any>, target: Any): Int {

    var count = 0
    var index = 0

    while (index < listData.size) {
        if (listData[index] == target) {
            count++
        }
        index++
    }

    return count
}
/**
 * This function takes in a list of elements and a target element, and returns the number of occurrences of the target
 * element in the list.
 *
 * @param listData A list of elements.
 * @param target The target element to count the occurrences.
 * @return The count of occurrences of the target element in the list.
 */
fun countOccurrences(listData: List<Any>, target: Any): Int {
/**
 * This function takes in a list of elements and a target element, and returns the number of occurrences of the target
 * element in the list.
 *
 * @param listData A list of elements.
 * @param target The target element to count the occurrences.
 * @return The count of occurrences of the target element in the list.
 */
fun countOccurrences(listData: List<Any>, target: Any): Int {

    var count = 0
    var index = 0

    while (index < listData.size) {
        if (listData[index] == target) {
            count++
        }
        index++
    }

    return count
}