... which will count everything from the current or -- if you give it an argument -- an arbitrary directory down. Changing it into a script instead of a one-liner is left as an exercise to the reader. :-)