Originally posted by dsegel
ls -l | wc -l
Actually that'll give you 1 more than the total number of files since it includes the 'total' line at the top in the count.
That's why you should just use ls | wc -l
(In Aix at least. Guess it's the same with Linux. Writing this in Windows, and I don't want to boot my Sarge up to test it