sw-collector: Avoid naming conflicts with local count variables