title: Counting elements of a list and sublists
body: <p>I'm trying to create a function to count all the elements in a list, including the elements of its sublists. initially, to get started, i came up with a basic function <code>myList</code>:</p>
  
  <pre><code>(define myLength 
    (lambda (L)
      (cond
        ((null? L) 0)
        (else (+ 1 (myLength (cdr L)))))))
  </code></pre>
  
  <p>However, it doesn't help me account for function calls like:</p>
  
  <pre><code>(numAtoms '())              "...should be 0"
  (numAtoms '(()))            "...should be 0"
  (numAtoms '(1 1))           "...should be 2"
  (numAtoms '(1 (1 1) 1))     "...should be 4"
  (numAtoms '(1 (1 (1 1)) 1)) "...should be 5"
  </code></pre>
  
  <p>I'm trying to use basic functions like <code>length</code>, <code>null?</code>, and <code>list?</code>.  </p>