import collections


def get_count_freq(corpus):
    """Construct dictionaries about words and count.

    Args:
        corpus: list of str words.
    Returns:
        list of (word, count) pairs, dictionary that maps word to its frequency.
    """
    word_count = collections.Counter(corpus)
    word_count = sorted(word_count.items(), key=lambda x: x[1], reverse=True)
    word_sum = sum([item[1] for item in word_count])
    word2freq = dict()
    for w, c in word_count:
        word2freq[w] = c / word_sum
    return word_count, word2freq