PYTHON STACK FUNCTION count the valid number of brackets Returns the total number of valid brackets in the string
By Zachary McKenzie at Dec 12 2020