Updated document count queries (with notes)