countFiles(){
path=$1
pathName=`ls $path`
sum=0
for i in $pathName
do
num=`ls $path$i |wc -l`
sum=$[ $sum + $num ]
done
echo $sum
}
countFiles "../data/"