small script that counts the number of figures
added source codes
formatted