countOccurrences

Returns the number of repetitions of the value you sent in the array you have.

Code