make removal of a counter really thread safe

it wasn't
allow to renew connections when a certain number of responses has been received