Write a function count_value(arr, value) that counts how many times a specific value appears in an array without using built-in count methods.
Example:
Input: arr = [1, 2, 2, 3, 2, 4, 2], value = 2
Output: 4
Constraints:
Test Cases
Test Case 1
Input:
[1, 2, 2, 3, 2, 4, 2], 2Expected:
4Test Case 2
Input:
[5, 5, 5, 5], 5Expected:
4Test Case 3
Input:
[1, 2, 3, 4, 5], 6Expected:
0+ 2 hidden test cases