[…] I need help to get a better understanding on where to apply reference counting (where to increase reference count and where to decrease reference count).