title: Count the amount of times a string appears in a file
body: <p>I'm trying to figure out how I would read a file, and then count the amount of times a certain string appears. </p>
  
  <p>This is what my file looks like, it's a .txt:</p>
  
  <pre><code>    Test
      Test
      Test
      Test
  </code></pre>
  
  <p>I want the method to then return how many times it is in the file. Any idea's on how I could go about doing this? I mainly need help with the first part. So if I was searching for the string "Test" I would want it to return 4.</p>
  
  <p>Thanks in advanced! Hope I gave enough info!</p>