What should i do to trigger a watch only when condition matches to a certain requirement

i am not able to understand you. can you write a sample for my query,

i think i need to write compare condition when current count of "ctx.payload.hits.total" is gte than
Last "ctx.payload.hits.total" but dont know how to compare two "ctx.payload.hits.total" current one and last one. :frowning: