in reply to Re: Finding Rectangles in PDFs
in thread Finding Rectangles in PDFs

Forgive me for being a pedantic jerk, I really only say this for a fuller understanding of Unix tools. But if all you care about is a count of the number of matches that grep finds, you can simply use the -c flag of grep instead of piping the output to wc.

$ pdftk GBA.pdf output - uncompress | grep -c ' re$'

See also: UUOC "wc -l" section.