I have specific conditions.
How to count a specific criterion in a cell is an example attached.
I entered the expected results.
I have tried the formula, but it is not the correct result for all conditions
=IF(ISNUMBER(LEFT(B$1;1)*1);(LEN($A2)-LEN(SUBSTITUTE($A2;B$1;"")))/LEN(B$1);SUM(LEN(" "&SUBSTITUTE($A2;" ";" ")&" ")-LEN(SUBSTITUTE(" "&SUBSTITUTE($A2;" ";" ")&" ";" "&B$1&" ";"")))/LEN(" "&B$1&" "))