count each type of file under a directory