How can I find the number of indexes in a 2D array in Java