function getNumberOfArrayUrlSegments(routesArray) {
  return routesArray.reduce((accNumSegments, currentRoute) => {
    // array members can be a RegEx -> convert them toString
    return accNumSegments + utils.getNumberOfUrlSegments(currentRoute.toString());
  }, 0);
}
Returns the number of URL segments in an array of routes

Example: ['/api/test', /\/api\/post[0-9]/, '/users/:id/details`] -> 7