Use buid-in couch reduce functions when possible.