As previously documented (88f5add0) wc's output is inconsistent between Linux and BSDs. Use grep -c instead.