ls | wc -l
ls | wc -l #Count files on current directory
ls path/to/dir | wc -l #Count files on specific directory path
#count files in a directory faster with:
ls -f | wc -l
ls | wc -l #Count files on current directory
ls path/to/dir | wc -l #Count files on specific directory path
ls | grep "specific_regex" | wc -l #Count files in dir with specifig
# regex filename
# Use this command
ls /etc | wc -l
# replace /etc with the path to the directory you want to work with