<? $total= count(glob('/full/path/to/directory/*')); echo "There are $total files in the directory"; ?>