Braze interview question

How to count parenthesis in string