Pergunta de entrevista da empresa TiVo

How would one implement reference counted objects?