Rails Gem: not nested objects not updating attributes?

Using the Algolia Gem, (https://github.com/algolia/algoliasearch-rails/blob/master/README.md) I’m trying to index a Post’s Tags when the Post is updated.

After a Post is saved, I’ve set Post to touch all its Tags. Like mentioned here:

class Post < ApplicationRecord
   after_save do

And Tag is set to index! after it is touched.

module ActsAsTaggableOn
  class Tag
    include AlgoliaSearch
    after_touch :index!

    TAG_INDEX = "Tags_#{Rails.env}"

    algoliasearch index_name: TAG_INDEX do
      attribute :taggings_count, :name, :updated_at

      searchableAttributes [

      customRanking [

But taggings_count is always 0.

I suspect that taggings_count is set after the Tag is saved. But I’m not sure.
I’d like to get the correct taggings_count set in the index when Post is saved. Is there a way to get this to work?