# Count files in dir $path find -type f >temp.txt; $str = wc temp -l; $count = int::substr($str, 0, 1); #returns the first #character as an int