Use counter for tracking container states Upstream-commit: 669f4ba37ef6eb5419306e6af4f6efdce92501a0 Component: engine