Counting atoms in a formula