Replace deprecated SQLAlchemy Table.count() by sqlfunc.count().