added comments
Find the number of pools in a 2D array