You can do this either in a custom report or a custom statistic.
In custom reports you can filter on any stat you like, so this is probably the easiest way.
Create a report in the 'holdem cash hands' section and add a filter on the Rake stat (#Rake# > 0.40) then when you run your report it will list all your hands which raked over 40c and the total line will tell you how many hands this is.
Ah, sorry - you want to know when you've contributed too...
You can also filter for when you bet more than zero: amt_bet_p > 0 will do it (you bet more than 0 preflop).
If you want to be able to show this value in your reports you can create a custom stat for it.
I forgot, but I already built one. This is the column I use:
sum ( if[ holdem_hand_player_detail.amt_bet_ttl > 0 AND holdem_hand_summary.amt_rake > 0, 1, 0 ] )
You'll need to change it a bit if you want to check for rake over 40c, but that's easy.
The stat is in the 'holdem cash player statistics' section.
Custom Reports guideCustom Stats guideCustom Statistics and Reports FAQ.
Have a go, and if you get stuck please post back and we'll help you out.