Find Connected Region Number from a 2D matrix