How to get the number of registrants (RNG module) from the theme layer In my theme I want to display not only the maximum number of registrants on the full view of a node but also the number of seats still available.

What is the easiest way to get the number of registrants? In Drupal 7 I retrieved this number by passing the node id into the registration_event_count() function, does RNG provide a similar function?
You can access the event manager service to grab an event meta object. The event meta object contains a bunch of helpers to manipulate registrations and registrants. In your template preprocess functions add whatever data you want from the event meta object.
function mymodule_preprocess_HOOK(&amp;$variables) {
  $event_entity = $entity; // Provide your entity

  /** @var \Drupal\rng\EventManagerInterface $event_manager */
  $event_manager = \Drupal::service('rng.event_manager');
  $event_meta = $event_manager-&gt;getMeta($event_entity);
  $mydata = $event_meta-&gt;whatever(); 
   // See \Drupal\rng\EventMetaInterface for methods. e.g:
   // $event_meta-&gt;getRegistrants()
   // $event_meta-&gt;getRegistrations()
   // $event_meta-&gt;countRegistrations()
   // $event_meta-&gt;getCapacity()
   // $event_meta-&gt;remainingCapacity()
  $variables['myvariable'] = $mydata;
}

For nodes, replace mymodule_preprocess_HOOK with mymodule_preprocess_node and $entity with $variables['node'].