intent: Returning distinct rows in SQLAlchemy with SQLite
rewritten_intent: SQLAlchemy count the number of rows with distinct values in column `name` of table `Tag`
snippet: session.query(Tag).distinct(Tag.name).group_by(Tag.name).count()