title: Count how many times strings from one data frame appear to another data frame in R dplyr
body: <p>I have two data frames that look like this:</p>
  <pre class="lang-r prettyprint-override"><code>df1 &lt;- data.frame(reference=c(&quot;cat&quot;,&quot;dog&quot;))
  print(df1)
  #&gt;   reference
  #&gt; 1       cat
  #&gt; 2       dog
  df2 &lt;- data.frame(data=c(&quot;cat&quot;,&quot;car&quot;,&quot;catt&quot;,&quot;cart&quot;,&quot;dog&quot;,&quot;dog&quot;,&quot;pitbull&quot;))
  print(df2)
  #&gt;      data
  #&gt; 1     cat
  #&gt; 2     car
  #&gt; 3    catt
  #&gt; 4    cart
  #&gt; 5     dog
  #&gt; 6     dog
  #&gt; 7 pitbull
  
  </code></pre>
  <p><sup>Created on 2021-12-29 by the <a href="https://reprex.tidyverse.org" rel="noreferrer">reprex package</a> (v2.0.1)</sup></p>
  <p>I want to find how many times the words cat and dog from the df1 exist in df2.
  I want my data to look like this</p>
  <pre><code>animals   n
  cat       1
  dog       2
  </code></pre>
  <p>Any help or guidance is appreciated. My reference list is huge. I tried to grep each one of them but ll take me time.</p>
  <p>Thank you for your time. Happy holidays</p>