src/Event.php
public static function countHandlers($class, $name)
    {
        $class = ObjectHelper::getClass($class);
        $count = 0;

        do {
            if (!empty(self::$events[$class][$name])) {
                $count += count(static::$events[$class][$name]);
            }
        } while (($class = get_parent_class($class)) !== false);

        return $count;
    }
public static function countHandlers($class, $name)
    {
        $class = ObjectHelper::getClass($class);
        $count = 0;

        do {
            if (!empty(self::$events[$class][$name])) {
                $count += count(static::$events[$class][$name]);
            }
        } while (($class = get_parent_class($class)) !== false);

        return $count;
    }
public static function countHandlers ( $ class , $ name ) { $ class = ObjectHelper :: getClass ( $ class ) ; $ count = 0 ; do { if ( ! empty ( self :: $ events [ $ class ] [ $ name ] ) ) { $ count += count ( static :: $ events [ $ class ] [ $ name ] ) ; } } while ( ( $ class = get_parent_class ( $ class ) ) !== false ) ; return $ count ; }
Count handlers of events.

@param string|object $class
@param string $name name of event
@return int
Count handlers of events .