for the count you will want to take a look at the model lifecycles: https://strapi.io/documentation/v3.x/concepts/models.html#lifecycle-hooks
This will let you run some queries before or after another one, so say afterCreate you will want to check how many existing comments there are and make an update (could also do before as well).