Count distinct document terms while… — Code review | OneNoughtOne