```ts
export function routeStops(route: string): string[] {
  if (typeof route !== 'string') {
    throw new Error('route must be a string');
  }

  return route.split('>').map(stop => stop.trim());
}

export function routeHops(route: string): number {
  const stops = routeStops(route);
  return stops.length - 1;
}
```