Count the minimal number of jumps.