Pergunta de entrevista da empresa Philips

Write a method that returns the number of "islands" in two dimensional array.