#! /bin/bash
#count files under subtree.
touch /tmp/t$$
find $1 -type f -exec echo "1" >> /tmp/t$$ \;
wc -l < /tmp/t$$ 
rm /tmp/t$$ 
