Fixed a bug in file count