Instead of tracking a separate variable, could we just pass ```branches.length```?