Given a string, determine the highest depth of nested parentheses and return its count. If there is an invalid amount of parentheses, return -1. Use dfs as the method name.
dfs
Example:
"(a) (b)" => 1
"(a) (b))" => -1
"((a) (b))" => 2