added the code for counting the islands in a two dimentional array