script to count files in a directory

Hello,

I was wondering if anyone had an answer for this?

thanks,

KW

Hi,
I think this link will help u

try using this.

ls -l|grep -c '^-'
ls -1 | wc -l 2>/dev/null