Count based on multilple values

Hello,

I need to add a field on the contact page that would calculate the number of open cases of a specific type. 

I tried the following formula, but even tho i'm not getting error message, the calculation does not seem to work.


count(and(equal(related($cases,"type"),"reclamation"),not(equal(related($cases,"status"),"closed"))))


Any idea how to acheave my goal?

Thanks for your help.