What are some functions in PHP that can be used to count files in a directory?
To count files in a directory using PHP, you can use the `scandir` function to get an array of all files in the directory, then use the `count` function to get the total count of files in that array.
$directory = 'path/to/directory';
$files = scandir($directory);
$fileCount = count($files) - 2; //subtract 2 to exclude '.' and '..' directories
echo "Total files in directory: " . $fileCount;