private function retrieveFilesNumber($path, $regex)
    {
        $files = new Finder();
        $files->in($path)->files()->depth(0)->name($regex);

        return iterator_count($files);
    }
private function retrieveFilesNumber($path, $regex)
    {
        $files = new Finder();
        $files->in($path)->files()->depth(0)->name($regex);

        return iterator_count($files);
    }
private function retrieveFilesNumber ( $ path , $ regex ) { $ files = new Finder ( ) ; $ files -> in ( $ path ) -> files ( ) -> depth ( 0 ) -> name ( $ regex ) ; return iterator_count ( $ files ) ; }
Tree Iterator.

@param $path
@param $regex

@return int
Tree Iterator .