<human>:  Returning distinct rows in SQLAlchemy with SQLite
<bot>: Here is some code to sQLAlchemy count the number of rows with distinct values in column `name` of table `Tag`

session.query(Tag).distinct(Tag.name).group_by(Tag.name).count()

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.