hashmap: add API to disable item counting when threaded