Normally you can't find how many files are different in two folders.It is possible only less amount of files inside of two folders.If number of file increase means we can't compare whether present in both folders.For that we use below the command .It shows how many files are present in folder1 not in folder2 same as vice-versa
diff -r pathOfFolder1 pathOfFolder2
Example :
folder1 constains t1,t2 and
folder2 contains t1,t4 means that output will like this
Only in pathOfFolder1 : t2
Only in pathOfFolder2 : t4
diff -r pathOfFolder1 pathOfFolder2
Example :
folder1 constains t1,t2 and
folder2 contains t1,t4 means that output will like this
Only in pathOfFolder1 : t2
Only in pathOfFolder2 : t4