in reply to Counting no of '>' symbol in a file

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