How to get the different counts mentioned for threat matches detected and fields enriched with threat intelligence under threat intelligence overview in Security Alerting

Under threat intelligence overview tab, how can I calculate the different counts mentioned for threat matches detected and fields enriched with threat intelligence

For my use case I wanted to understand is there an API associated, or it this handled on the Kibana source code level.

If it is kibana source code, kindly explain and help me with the logic along with the links to the exact kibana code where this logic is getting built.

If anyone is looking at this, this question is a duplicate of this one and was answered here :smiley: