perl -E 'say scalar grep />/, <>' file