Fixed two functions: count_char_allfiles and count_for_each_file