update number of keys