count changes correctly for all Object types and fix debug output