First file.An efficient counting algorithm.