Count of files a dir: ls -1 /path/to/dir | wc -l