implement addCount() to count assignments

also removed some junk code.