Add logging of objects in count example