calculate paths count constraining distance
update calculations, update specs, complete example spec