Adjusting has_pipe to return the number of pipes (0==false; counting numbers are true