It depends on what you mean by checking
"if a particular string occurs a certain number of times in the array":
1. You may want to count the absolute number of occurences of the string in the array. Meaning, you count three if array element 52 contains three occurences of the string. In this case, you use the suggestion of gaal above.
2. On the other hand, you may want to count the number of array elements which test positive on the occurence of the string, regardless of how many strings each array element contains. Meaning, you count only once even if array element 52 contains three occurences of the string. In this case, you use the suggestion of foil above.