Rewrite the counter as an iterator
This breaks out the printing logic from the underlying work of actually counting the files. It also opens up the possibility of unit testing, which a couple small tests demonstrate.
This breaks out the printing logic from the underlying work of actually counting the files. It also opens up the possibility of unit testing, which a couple small tests demonstrate.