The command sequence is very hard to follow.
What is the exact error you see?
What is the script meant to do?
Are you trying to find all files in the current directory tree which contain the string "unixs317" and output the count of "unixs317" in each named file to output.txt ?