Grate and squeeze out milk from 2 coconuts. Save 3/4 cup of the first milk squeezed out (rich milk) for topping. Dilute the rest of the coconut milk to make 3 1/2 cups. Or use 1 can (12 ounces) frozen coconut milk, saving 3/4 cup of the thick milk for topping and diluting the rest to make 3 1/2 cups.
Boil rice and coconut milk in a heavy pot stirring constantly to keep from burning (about 15 to 20 minutes). When the rice is done and almost dry, lower the heat and add the sugar and butter. Mix well and set aside. When cool, add the egg.
Spread the rice mixture in a well buttered Pyrex dish (11 3/4 x 7 1/2 x 1 3/4 inch) and bake in a preheated 300°F oven for 20 minutes.
Meanwhile, prepare the topping. Combine all topping ingredients in a heavy saucepan and cook over low heat stirring constantly until thick (about 15 minutes). Pour topping over rice mixture in dish. Increase oven heat to 350°F Bake until top is brown (about 15 minutes).