title: count how many times a string appears within another string
body: <p>I have a string which points to a CSS file</p>
  
  <pre><code>../../css/style.css
  </code></pre>
  
  <p>I want to find out how many </p>
  
  <pre><code>../
  </code></pre>
  
  <p>are within the string.</p>
  
  <p>How do I get this with JavaScript?</p>