Because you're counting the number of lines and not the character count per line (per choroba stating that a fasta file will only have one '>' per line), grep will work.
perl -E 'say scalar grep />/, <>' file
In reply to Re: Counting no of '>' symbol in a file
by stevieb
in thread Counting no of '>' symbol in a file
by GSperlbio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |