Use this formula
where range is the range that you want to search, and text is the text that you want to find (the text must be enclosed in quotation marks).
NOTE: The above formula must be entered as an array formula. To enter an array formula, press CTRL+SHIFT+ENTER.
Use the COUNTIF() function to count the occurrences of a text string. For example, use the formula
where range is the range of cells that you are evaluating, and text is the text string that you want to count instances of (note that text must be enclosed in quotation marks).
NOTE: This formula must be entered as an array formula. To enter an array formula, press CTRL+SHIFT+ENTER.
Wildcard characters can be used within the COUNTIF function.
The asterisk character (*) represents more than one character. For example, to count all the cells in the range a1:a10 that contain an "x," you can use the following formula:
The question mark character (?) can also be used to represent one wildcard character -- for example, to count all cells in the range whose second character is the letter, such as "ax" or "bx."
Hope this will help you.