add verification for doc_count in gateway&clients