Using Transform for document count when document updated

Checked multiple other potential solutions, I am trying to exporter the aggregation data to some other data storage.

Logstash elasticsearch input plugin seems to be an alternative. Sadly plugin version we are using does no support it.

Watcher seems to be another alternative. Below is a thread about it