How to count no of files in a directory which is in another machine?
I used the following code.But it is not working.

 $dir_path ="file://$sub_code/$sub_code".N."$churunano/*.*";
  $count = count(glob($dir_path));
     $files = glob($dir_path);

 The above code returns the count as 0.

It won't work like that glob(); only works on the servers local filesystem, however.

Is their any way to count the files in network share?

The "img" folder in is shared.