A function to count the number of occurances of a give value within an array
the 1D array to search
the value we are seeking
number of occurances
A function to count the number of occurances of a give value within an array