Braze Interview Question

How to count parenthesis in string