file reading and counting works