View counter in strapi: With lifecycle hooks? But how to use them?

I think the afterFindOne won’t save the entry in db. But you can manually run the query to update the count something like below.

afterFindOne(result, params, populate){
      const article = await strapi.services.article.findOne({ slug: result.slug });
      await strapi.services.article.update({ id: article.id },{ views: parseInt(article.views) + 1 });
}