title: Counting occurences of characters in a String using tail recursion
body: <p>I have no clue how to count the occurrences of characters in a string using tail recursion in scala.</p>
  
  <p>I need to run a program with input</p>
  
  <pre><code>times(explanation)
  </code></pre>
  
  <p>and the output is:</p>
  
  <pre><code>List((e,1), (x,1), (p,1), (l,1), (a,2), (n,2), (t,1), (i,1), (o,1))
  </code></pre>
  
  <p>I tried running RLE so far but the topic of tail recursion is new to me, so some steps/algorithm for doing so would be perfect</p>