added a counter for deleted files using a closure
comment