protected function getEventsCount() {
    $query = $this->connection->select('node_field_data', 'n');
    $query->addExpression('COUNT(*)');
    $query->condition('n.type', 'event');
    $query->condition('n.status', 1);
    return $query->execute()->fetchField();
  }
protected function getEventsCount() {
    $query = $this->connection->select('node_field_data', 'n');
    $query->addExpression('COUNT(*)');
    $query->condition('n.type', 'event');
    $query->condition('n.status', 1);
    return $query->execute()->fetchField();
  }
protected function getEventsCount ( ) { $ query = $ this -> connection -> select ( 'node_field_data' , 'n' ) ; $ query -> addExpression ( 'COUNT(*)' ) ; $ query -> condition ( 'n.type' , 'event' ) ; $ query -> condition ( 'n.status' , 1 ) ; return $ query -> execute ( ) -> fetchField ( ) ; }
Get total count of events.
Get total count of events .