INTERLEAVING LOGIC AND COUNTING