This method checks to see if the given value is within the array that it is passed. For every occurrence of the value in the array, the counter increases. The method will return an int with the count of the given value in an int.
In each loop the next item in the array is compared against the value that is being searched for. if the value matches the search term, then the counter increases by one. The count is then returned at the end of the method.
This method obviously uses ints, but it would be jsut as easy to use doubles or any other value type including chars in a char array.