remove abandonded api `set_database` in doc
raise exception before unexpected counter change
test for counter exception