In Rails I can perform a simple ORM query for the number of Likes a model has:
@records = Model .select( \'model.*\' ) .select( \'count(likes
This sequelize github issue looks totally like your case:
User.findAll({ attributes: ['User.*', 'Post.*', [sequelize.fn('COUNT', 'Post.id'), 'PostCount']], include: [Post] });