Implement Reference Counting in C