Straightforward sum of the given keyname.

def aggregate_count(keyname):
    """
    Straightforward sum of the given keyname.
    """
    def inner(docs):
        return sum(doc[keyname] for doc in docs)

    return keyname, inner