title: Count the number of occurrences of a character in a string
body: <p>How do I count the number of occurrences of a character in a string?</p>
  <p>e.g. <code>'a'</code> appears in <code>'Mary had a little lamb'</code> 4 times.</p>