tostring method
return number of all files
refactored with bag