/**
 * Count the number of occurrences of a specific value in a list.
 *
 * @param data a list of values
 * @param value the value to count
 * @return The count of occurrences of the specified value
 *
 * Example:
 * - Input: [1, 2, 2, 2, 3], 2
 * - Output: 3
 */
fun countOccurrences(data: List<Int>, value: Int): Int {

    var count = 0

    // Iterate through the list and count occurrences
    for (item in data) {
        if (item == value) {
            count++
        }
    }

    return count
}
/**
 * Count the number of occurrences of a specific value in a list.
 *
 * @param data a list of values
 * @param value the value to count
 * @return The count of occurrences of the specified value
 *
 * Example:
 * - Input: [1, 2, 2, 2, 3], 2
 * - Output: 3
 */
fun countOccurrences(data: List<Int>, value: Int): Int {
/**
 * Count the number of occurrences of a specific value in a list.
 *
 * @param data a list of values
 * @param value the value to count
 * @return The count of occurrences of the specified value
 *
 * Example:
 * - Input: [1, 2, 2, 2, 3], 2
 * - Output: 3
 */
fun countOccurrences(data: List<Int>, value: Int): Int {

    var count = 0

    // Iterate through the list and count occurrences
    for (item in data) {
        if (item == value) {
            count++
        }
    }

    return count
}