If you need to count the number of cells in a range containing a string (not numbers, dates, or times), you can use the COUNTIF function with criteria marked with an asterisk (*).