the script will count number of files with good extensions.