How to find number of Rectangle