private function calculateRegisteredMembers(NodeInterface $node) {
    // Fetch all members from the current campaign.
    /** @var \Drupal\Core\Database\Query\Select $query */
    $query = $this->connection->select('openy_campaign_member_campaign', 'mc');
    $query->addField('mc', 'id');
    $query->condition('mc.campaign', $node->id());
    $query = $query->countQuery();
    $amount = $query->execute()->fetchField();

    return (int) $amount;
  }