title: Is there a better way to count punctuation in a sentence?
body: <p>I want to count 'end sentences' e.g. full stops, exclamation marks, and question marks. </p>
  
  <p>I have written a little loop to do this, but I was wondering if there is a better way. Not allowed to use built-in functions.</p>
  
  <pre><code>for line in textContent:
      numberOfFullStops += line.count(".")
      numberOfQuestionMarks += line.count("?")
      numberOfQuestionMarks += line.count("!")
  
  numberOfSentences = numberOfFullStops + numberOfQuestionMarks + numberOfExclamationMarks
  </code></pre>