def get_model_counts(tagged_models, tag):
    """ This does a model count so the side bar looks nice.
    """
    model_counts = []
    for model in tagged_models:
        model['count'] = model['query'](tag).count()
        if model['count']:
            model_counts.append(model)
    return model_counts
