Update reader.sh

portability and change `grep | wc -l' to `grep -c'