Added calculate number of files