Can I get termination state from fetch method or lua script?

I want to count the timeout connections using stick-counter , but I can’t seem to catch anything.
If you know how, please let me know.