Add count to document.