- return render_template("index.html", count=count, downloads=downloads, \
+ tags = db.session.query(func.count(Tags.c.tag_id), Tag) \
+ .select_from(Tag).outerjoin(Tags).group_by(Tag.id).order_by(db.asc(Tag.title)).all()
+
+ return render_template("index.html", count=count, downloads=downloads, tags=tags, \