(count '(a (b (c)) d . e)) => 5
(define (count x) (cond ((null? x) 0) ((pair? x) (+ (count (car x)) (count (cdr x)))) (else 1)))