Comparing data in file with values in table

Hi,

I want to calculate the number of pipe delimiters in a file for all lines seperately.

For eg:i have a file Project.txt

Mohit|chawla|123|678
File1|File2|345|767|678

And my file contains many lines like this
it shd give me the output as
4
5
or give me the output for all the values greater than 4