/**
 * This function takes a list of numbers and a target number as parameters. It counts the number of occurrences of
 * the target number in the list and returns the count.
 *
 * @param numbers A list of numbers.
 * @param target The number to count occurrences of.
 * @return The count of occurrences of the target number in the list.
 *
 * Example:
 * val numbers = listOf(1, 2, 1, 4, 1, 6, 1)
 * val target = 1
 * countOccurrences(numbers, target) // Output: 4
 */
fun countOccurrences(numbers: List<Int>, target: Int): Int {

    var count = 0
    for (num in numbers) {
        if (num == target) {
            count++
        }
    }
    return count
}
/**
 * This function takes a list of numbers and a target number as parameters. It counts the number of occurrences of
 * the target number in the list and returns the count.
 *
 * @param numbers A list of numbers.
 * @param target The number to count occurrences of.
 * @return The count of occurrences of the target number in the list.
 *
 * Example:
 * val numbers = listOf(1, 2, 1, 4, 1, 6, 1)
 * val target = 1
 * countOccurrences(numbers, target) // Output: 4
 */
fun countOccurrences(numbers: List<Int>, target: Int): Int {
/**
 * This function takes a list of numbers and a target number as parameters. It counts the number of occurrences of
 * the target number in the list and returns the count.
 *
 * @param numbers A list of numbers.
 * @param target The number to count occurrences of.
 * @return The count of occurrences of the target number in the list.
 *
 * Example:
 * val numbers = listOf(1, 2, 1, 4, 1, 6, 1)
 * val target = 1
 * countOccurrences(numbers, target) // Output: 4
 */
fun countOccurrences(numbers: List<Int>, target: Int): Int {

    var count = 0
    for (num in numbers) {
        if (num == target) {
            count++
        }
    }
    return count
}