Why does a coconut have exactly three "holes"?
The three "holes" are the result of the 3 carpels in coconut flowers, and three carpels is typical of the family Arecaceae (Palms). The "holes" are actually germination pores, where one is usually functional and the other two are plugged. The new coconunt shoot will emerge from the functional, open, germination pore. 

For further info and pictures, see this webpage or the paper Morphological and anatomical studies of the coconut (Smit 1970, link to pdf), which holds a wealth of information.