Counting via debug output