sqlAlchemy count to give all values code example
Example: query to count the number of rows in a table in sqlalchemy
UserImage.query.filter(UserImage.user_id == 1).count()
UserImage.query.filter(UserImage.user_id == 1).count()