title: Ruby count number of found keywords in string
body: <p>I have an array with keywords and I have a string, which may contain those keywords. I now need to know how many keywords are in the given string:</p>
  
  <pre><code>keywords = [ 'text' ,'keywords' ,'contains' ,'blue', '42']
  text = 'This text is not long but it contains 3 keywords'
  </code></pre>
  
  <p>How can I now find out with a ruby command how many of the strings in my array are in the text (three in this case)? I could of course use a for each loop but I am almost sure that there is a more concise way to achieve this.</p>
  
  <p>Thanks for your help</p>
  
  <p><strong>Update</strong>: Preferably the solution should not rely on the spaces. So the spaces could be replaced by arbitrary characters.</p>
  
  <p><strong>Update 2</strong>: The command should look for unique occurrences.</p>