title: i am getting count as 1 instead of 0 when i did groupby using sequelize in nodejs
body: <p>I have two tables &quot;project&quot; and &quot;company&quot;. I have created their models as 'Project' and 'Company' in sequelize.</p>
  <p>Project table contains</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>project_id</th>
  <th>company_id</th>
  <th>project_name</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>1</td>
  <td>project1</td>
  </tr>
  <tr>
  <td>2</td>
  <td>2</td>
  <td>project2</td>
  </tr>
  <tr>
  <td>3</td>
  <td>2</td>
  <td>project3</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Company table contains</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>company_id</th>
  <th>company_name</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>xyz</td>
  </tr>
  <tr>
  <td>2</td>
  <td>test</td>
  </tr>
  <tr>
  <td>3</td>
  <td>abc</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>my requirement is to get all companies in the Company table and the no of projects they have.</p>
  <p>i have wrote the query in sequelize as</p>
  <pre><code>const result = await Company.findAll({
      attributes: [ ['company_id', 'id'] ,'company_name', [Sequelize.fn('COUNT', 'Project.project_id'), 'no_of_projects'] ],
      include: [{ model: Project, attributes: [] }],
      group: ['company_id'],
      order: [
          [sortBy, sortOrder]
      ],
      offset: index,
      limit: limit,
      subQuery: false
  })
  </code></pre>
  <p>but i am getting no_of_projects as 1 instead of 0 for company &quot;abc&quot; as it doesn't have any project. I need to get no_of_projects as 0 if there is no project for the company. i am new to sql and sequelize. can anyone please help me in solving this. thanks in advance.</p>
  <p>these are the associations</p>
  <p>Company.associate = function(models) {
  Company.hasMany(models.Project, {
  foreignKey: &quot;company_id&quot;
  })
  }</p>
  <p>Project.associate = function(models) {
  Project.belongsTo(models.Company, {
  foreignKey: 'company_id',
  })
  }</p>