lock the list when iterating over the counters

this will block add/removal operations but not increasing/decreasing of actual counters