[new] number of connected islands
[new] rectangular matrix rotation