SELECT dest , COUNT( dest )
FROM lan
GROUP BY `dest` ORDER BY COUNT( dest ) DESC
LIMIT 0, 30
query = session.query(LanModel.dest, func.count(LanModel.dest)).group_by(LanModel.dest)
query = query.order_by(LanModel.dest.desc())
query = query.limit(30)
objs = query.all()