I resolved the issue. Mustache is not able to access fields with a dot inside them. I added a transform action, where I changed the field name, and then logged it out.
"transform": {
"script": {
"lang" : "painless",
"inline": "ctx.payload.hits.hits.forEach(hit -> hit._source.service_name_terms_count = hit._source['service.name.terms._count']); return ctx.payload"
}
}
"text": "Found ##{{ctx.payload._id}}## at ##{{ctx.payload._source.service_name_terms_count}}##"