fix count of documents