number of occurrences in array