Countable implementation for DocumentRepository