Building reply count field

Ok, I kind of got the get the idea on these lifecycle methods but I am unable to figure out the logic to setup using this. For example, this is my payload data for a comment : { name: ‘sadas’, content: ‘sadasdasd’, parent_comment: ‘1’ }. I am creating a new comment and setting the parent_comment value to 1 which basically says that this comment is the reply to comment with id 1. Now how would I update the count field on comment with id 1 in lifecycle method?