Let’s say you have a Google Sheet with Multi Line text like:

And you want to count how many times each phrase is mentioned or the most popular terms.
=query( ArrayFormula(PROPER(flatten(regexreplace(if(len(D2:D),split(D2:D,CHAR(10)),),"\.|\,|\?|;","")))), "select max(Col1), count(Col1) where Col1 <> '' group by Col1 order by count(Col1) desc label max(Col1) 'keyword'")
keyword | count |
Jquery | 569 |
Google Tag Manager | 438 |
Google Font Api | 273 |
Bootstrap | 251 |
Font Awesome | 201 |
WordPress | 138 |
Modernizr | 132 |
Adobe Experience Manager | 130 |
Jquery Ui | 101 |
Jquery Migrate | 95 |
Drupal | 93 |
Slick | 76 |
Varnish | 72 |
Yoast Seo | 70 |
Cart Functionality | 52 |
Zurb Foundation | 50 |
CHAR(10) is the split the phrases by each new line. aka \n for RegExr’s.
If your cells just have a comma separated list for each row, then swap with ” ,” instead.