get the count of each files in a directory terminal mac code example Example: count number of files in directory mac terminal ls -1 | wc -l