sqlalchemy select distinct count