How to count files in a directory using PHP?
PHP contains many functions like count(), iterator_count(), glob(), openddir(), readdir(), scandir() and FilesystemIterator() to count number of files in a directory.count() Function: The count() functions is an array function which is used to count all elements in an array or something in an object