Count islands and distinct shapes | LinkedIn