fix "skipped files" count calculation (#10141)

(cherry picked from commit d94194bef40aa634e422c81a1c01f9e9ef325237)
7 files changed