I have determined how to create the cast for the CountedPtr and I will start implementing tomorrow.