Update the list size after deleting a hash

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Clean the request when all keys are removed

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>