Adding counter for debugging