title: Way of counting words in a string
body: <p>I just need a function for counting a given word in a string.
  There is something that has to do with split but I cant get what I should do from then.
  Thank u for your time.</p>
  
  <p>PS I forgot to mention. My apologies. I want to do that with javascript.</p>