An n x n grid is composed of 1 x 1 squares where each square is either empty ' ', a slash '/', or a backslash '\\'. These slashes divide the square into regions.
Given the grid, return the number of regions.
Example 1:
Input: grid = [" /","/ "] Output: 2
Example 2:
Input: grid = [" /"," "] Output: 1
Constraints: 1 <= grid.length <= 30