Scanfile in shell

How can i ceck how many data files are contains in a file. with shell, Like php scanfile()

There is no function scanfile() in php, that I could find.

Are you asking for the number of files in a directory? Or the number of entries in a directory [ scandir()ish ]? Or the number of files listed in a file?