implement and test the count parantheses problem.