'total 0' in ls output

I have a Linux box, where some NAS shares are mounted. One script is running on it and failing because it first looks at second line of 'ls -l', when it says 'total 0', it fails.
If that directory is on local disk, it says 'total 38' and when same data is on NAS share, it says 'total 0' and it fails that script to run.
Is this something which can be changed ? I know that it shows block size occupied by data inside that directory, but why it doesn't show when same data is on NAS file-system ?

Can you post the output of the various commands you are referencing. You're talking about a script we can't see. What is the actual output of the network mounted directory and what is the actual output of it when it's local. A mounted directory (if not actually mounted) may show 0, so I would first suspect that the mount has failed if it is showing 0 files.

This server is a linux virtual server and /dev/simfs is a NAS device, which is mounted as /export on this virtual server.

(tty/dev/pts/27): bash: 904 > df -h .
Filesystem            Size  Used Avail Use% Mounted on
/dev/simfs            4.9T  983G  3.9T  20% /export
tlifsp13: /export/home/pams/to-klvsp-12162013
(tty/dev/pts/27): bash: 904 > ls -l
total 0          -------> on NAS drive, same data shows zero
-rw------- 1 pams klvsp 3789 Dec 16 11:44 SA89766.TXT
-rw------- 1 pams klvsp 4124 Dec 16 11:44 SA89779.TXT
-rw------- 1 pams klvsp 4106 Dec 16 11:44 SA89785.TXT
-rw------- 1 pams klvsp 4010 Dec 16 11:49 SA89796.TXT
tlifsp13: /export/home/pams/to-klvsp-12162013
(tty/dev/pts/27): bash: 905 > mkdir /var/tmp/test_dir
tlifsp13: /export/home/pams/to-klvsp-12162013
(tty/dev/pts/27): bash: 906 > cp -p * /var/tmp/test_dir/
tlifsp13: /export/home/pams/to-klvsp-12162013
(tty/dev/pts/27): bash: 907 > ls -l /var/tmp/test_dir
total 24              -------> on local drive, same data shows some value
-rw------- 1 pams klvsp 3789 Dec 16 11:44 SA89766.TXT
-rw------- 1 pams klvsp 4124 Dec 16 11:44 SA89779.TXT
-rw------- 1 pams klvsp 4106 Dec 16 11:44 SA89785.TXT
-rw------- 1 pams klvsp 4010 Dec 16 11:49 SA89796.TXT
tlifsp13: /export/home/pams/to-klvsp-12162013
(tty/dev/pts/27): bash: 908 >

There is a script setup in cronjob developed by application team and it says, if total = 0 then do not proceed, if total = more than 1, that file should be sent to some ftp site. Script is not a problem for me, but I was concerned only for that total value. NAS is properly mounted and lot of other users are able to read/write on it, but is there anything else that can be changed from OS side ? I am getting in touch with Storage team also to understand its behavior.