Import necessary modules
Add function dir_entry which opens and reads entry of a given directory if it is a file
Add function count_allfiles which writes the statistics of elements of all files in the given directory to the given file