Well, as I understand it, you want to find out how many files of a given name exists on the entire system...
Say you're counting the number of files named "tmp.sh" in the entire system:
find / -name tmp.sh | wc -l 2>/dev/null
You'll probably want the "2>/dev/null" on the end - it will take any errors and silently throw them away. This is especially helpfull if you run this as anormal user (not root).
Now say you want to find certain types of files in only your home directory:
find /your/home -name "*.sh" | wc -l
man find and man wc for more info... There's dozens of different way you can write your "find" to find very specific files...