title: Count the number of 'a' and 'A' characters in a string using only recursion and pattern matching
body: <blockquote>
  <p>Implement the <code>countA :: [Char] -&gt; Int</code> function that counts the number of occurrences  of the characters <code>a</code> and <code>A</code> in a string.</p>
  </blockquote>
  <blockquote>
  <p>Hint: Whether an item is <code>a</code> or <code>A</code> or some other element can be checked by using pattern matching.</p>
  </blockquote>
  <hr />
  <p>For example:</p>
  <pre><code>countA &quot;Appleapplet&quot; == 2
  
  countA &quot;Nietzsche&quot; == 0
  </code></pre>
  <p>I'm a beginner at learning Haskell and the first thing that came to mind was to do an <code>if</code>-<code>then</code>-<code>else</code> statement but that can't be the answer, because I have to do this with pattern matching. I don't even know where to begin and I don't fully understand how pattern matching works on lists. I can't use any imported functions in this exercise.</p>