def sort_counts(word_counts, method):
    """Sort a word count collection.
    
    Args:
      word_counts (collections.Counter): word counts
      method (str): sorting method
    
    """
    
    assert method in ['count', 'alphabetical'], "Invalid sorting method"
    
    if method == 'count':
        word_counts = word_counts.most_common()
    else:
        word_counts = sorted(word_counts.items())
        
    return word_counts