Fix doc_ids, counts, deleted docs. Add more tests