title: Lisp function count recurring a's in list
body: <p>I am trying to write a function that takes only a list as a parameter and counts the number of times the symbol <code>a</code> appears in the list, without counting any a's in a sublist within the list.</p>
  
  <p>I am very new to Lisp so please use as basic code as possible so I could understand what it is doing, even if it is inefficient.  </p>
  
  <pre><code>(defun times (l)
      (setf x 'a)
      (cond
          ((null l) nil)
          ((equal x (car l)) (+ 1 (times x (cdr L))))
          (t (times x(cdr l)))))
  </code></pre>
  
  <p>So <code>(times '(a b (a) c))</code> should return 1.  However I am getting the error that with this line times is getting two arguments when it should be getting one. </p>