Hello, you should add a “Liked By” relationship property between users and posts, so once an user hit the like button, update current post - liked by - add logged in user, then add +1 on the counter only if (advanced - sometimes ) current post - liked by - does not contain - logged in user.
Hope that helped