title: find the count of substring in string
body: <p>I have to find the count of a substring in a string using the C language.
  I'm using the function <a href="http://en.cppreference.com/w/c/string/byte/strstr"><code>strstr</code></a> but it only finds the first occurrence.</p>
  
  <p>My idea of the algorithm is something like searching in the string while <code>strstr</code> does not return null and 
  to substring the main string on each loop.
  My question is how to do that?</p>