title: Count number of times a word appears (dplyr)
body: <p>Simple question here, perhaps a duplicate of <a href="https://stackoverflow.com/questions/31776276/r-count-how-often-words-from-a-list-appear-in-a-sentence">this</a>?</p>
  
  <p>I'm trying to figure out how to count the number of times a word appears in a vector. I know I can count the number of rows a word appears in, as shown here:</p>
  
  <pre><code>temp &lt;- tibble(idvar = 1:3, 
                 response = (c("This sounds great",
                        "This is a great idea that sounds great",
                        "What a great idea")))
  temp %&gt;% count(grepl("great", response)) # lots of ways to do this line
  # answer = 3
  </code></pre>
  
  <p>The answer in the code above is 3 since "great" appears in three rows. However, the word "great" appears 4 different times in the vector "response". How do I find that instead?</p>