message: API: Replace .count with .countDocuments
diff: @@ -131,7 +131,7 @@ describe('Notifications', async () => {
  const res = await testHelper.commonUserPostRequest(teacher, '', newNotification);
  res.status.should.be.equal(200);
  - should.equal(await Notification.count({changedCourse: course}), course.students.length, 'Notification count mismatch');
  + should.equal(await Notification.countDocuments({changedCourse: course}), course.students.length, 'Notification count mismatch');
  });
  it('should not create notifications when the course is inactive', async () => {
  @@ -140,7 +140,7 @@ describe('Notifications', async () => {
  const res = await testHelper.commonUserPostRequest(teacher, '', newNotification);
  res.status.should.be.equal(200);
  - should.equal(await Notification.count({changedCourse: course}), 0, 'Notification count mismatch');
  + should.equal(await Notification.countDocuments({changedCourse: course}), 0, 'Notification count mismatch');
  });
  it('should forbid notification creation for an unauthorized teacher', async () => {
  @@ -172,7 +172,7 @@ describe('Notifications', async () => {
  const res = await testHelper.commonUserPostRequest(teacher, `/user/${student._id}`, newNotification);
  res.status.should.be.equal(200);
  - should.equal(await Notification.count({changedCourse: course}), expectedCount, 'Notification count mismatch');
  + should.equal(await Notification.countDocuments({changedCourse: course}), expectedCount, 'Notification count mismatch');
  }
  it('should fail if required parameters are omitted', async () => {
  @@ -286,7 +286,7 @@ describe('Notifications', async () => {
  const res = await testHelper.commonUserPostRequest(teacher, `/user/${student._id}`, newNotification);
  res.status.should.be.equal(200);
  - should.equal(await Notification.count({user: student._id}), 1, 'Notification count mismatch');
  + should.equal(await Notification.countDocuments({user: student._id}), 1, 'Notification count mismatch');
  });
  it('should respond with 400 for requesting text only targetType without text', async () => {
  