Does $OUTPUT_FILE exist? What are its permissions (ls -l $OUTPUT_FILE, getfacl $OUTPUT_FILE)? How many times is the echo "Output file..." executed? (I'd put that one outside the for, but it's your call)?
(I'm suspecting your find ... pipeline doesn't return anything)
Here are some ideas that might help you troubleshoot this:
Rather than redirect stanard out to a the file, pipe it to tee and include your file. Hopefully you should see the output on stdout (as well as have it go to $OUTPUT_FILE). E.g.:
echo "$count $filename" | tee $OUTPUT_FILE
Use an absolute path for $OUTPUT_FILE, not a relative path so that it's not dependent on where you invoke the script. If you're using relative you may not be looking in the right place for the output file.
Continue to invoke the script with -x so you can see exactly what's going on when you run it. Make sure the value of $OUTPUT_FILE is set at the time of redirection.
If you're not committed to using sh, you could try your script in bash. You could then make use of some of the bash options using the set builtin (see help set). When developing a script it can be useful to do a 'set -e' to have the script exit if something returns a non-zero exit status. You might also need to play with the status of pipefail. So to help debug you could put this at the top of your script:
>>$OUTPUT_FILEto the end of the loop, i.e.
d2uon the files to convert to Unix line ending. See the output of
cat -vteon the file to confirm.
touchworks. All three don't show any problem.