matchcount(a, v)
Returns the number of matches of object v inside array a.
matchcount(a, v, i)
As above but search starts at index i.
See also match find findall
Example
matchount( ( 1, 2, 1, 2, 2 ), 2 )
3