pipe_length function

Length of the pipeline