Fractals counting

 
Hi , what code syntax do i use if i simply want to count the number of times the top fractals appear over 50 bars for example? Just to count.