def count_ones(word_ones):
    """
    Counts the ones associated with a (word, next) pair
    word_ones: tuple (word, [1,1,..,1])
    return: tuple (word, count)
    """
    (word, ones) = word_ones
    return (word, sum(ones))