How can I count a word

hello please I need helpe for : How can I count a word from a matrix containing a group of different words, such like: I want to know how many times the word “cat” occurs in an array consisting of [cat / dog / cat / lion / tiger / cat / …] … etc.