Not sure I agree that the raw SQL is better, e.g. this one can just be `select([func.count(packages.c.id)])`