original_string: public static function count_rule_subscriptions($ruleid) {
          global $DB;
          $sql = self::get_subscription_join_rule_sql(true);
          $sql .= "WHERE s.ruleid = :ruleid";
  
          return $DB->count_records_sql($sql, array('ruleid' => $ruleid));
      }
code: public static function count_rule_subscriptions($ruleid) {
          global $DB;
          $sql = self::get_subscription_join_rule_sql(true);
          $sql .= "WHERE s.ruleid = :ruleid";
  
          return $DB->count_records_sql($sql, array('ruleid' => $ruleid));
      }
code_tokens: public static function count_rule_subscriptions ( $ ruleid ) { global $ DB ; $ sql = self :: get_subscription_join_rule_sql ( true ) ; $ sql .= "WHERE s.ruleid = :ruleid" ; return $ DB -> count_records_sql ( $ sql , array ( 'ruleid' => $ ruleid ) ) ; }
docstring: Get count of subscriptions for a given rule.
  
  @param int $ruleid rule id of the subscription.
  
  @return int number of subscriptions
docstring_tokens: Get count of subscriptions for a given rule .