ignore files that end with ~ and add counting step