How to check the remaining capacity for an event when using the Registration module?
The Rules module is a very flexible framework and it has a comprehensive api. While you may be able to accomplish your task using just the UI you may find it easier implement one or couple of hooks to alter your existing condition, or perhaps, add a new condition to be used. For example,    

/**
 * Implementation of hook_rules_condition_info().
 * @ingroup rules
 */
function yourmodule_rules_condition_info() {
  return array(
    'yourmodule_condition_example' =&gt; array(
      'label' =&gt; t('Compare two users'),
      'arguments' =&gt; array(
        'user1' =&gt; array('type' =&gt; 'user', 'label' =&gt; t('First user to compare')),
        'user2' =&gt; array('type' =&gt; 'user', 'label' =&gt; t('Second user to compare'))
      ),
      'module' =&gt; 'user',
    ),
  );
}


If you decide to go this way, you may want to check https://drupal.org/node/298533