Hi Raghu,
As output of 'Relational operator' is boolean, it first needs to be converted to double before sending it to 'Cumulative sum block'. Conversion can be done using 'Data conversion block' in which you need to specify the required output data type. I have attached a sample model 'RelationalOperatorCounter_1' for your reference.
If you have any problem with this model, you can try 'RelationalOperatorCounter_2'. For more details on 'Cumulative sum block', refer this documentaion link.
Hope this helps!