Delete term count transients after stock status change and trashed post

Closes #5286