Corrected error on counting items in data files.