I did this last fall. There were quite a few screws and bolts--maybe 10 per board. Some were lags, and others were bolts. Once I got the hardware out the wood popped right off. I then cleaned out the rotten wood from the cubbies, let it dry, used CPES to help seal up the wood, and then filled it with thickened West System epoxy. Finally, I painted the cubby and refinished and reinstalled the teak. Be patient and get the cubby wood as dry as possible. Oddly enough, the port side cubby had quite a bit of rot, while the starboard side had very little. Since the teak was previously grey, the cockpit now looks really nice.
I also had a local canvas shop make covers to keep the rain water out from this point on.
This fall: the cabintop grabrails!