The Shimano Di2 cables are suitable for the Dura Ace 9070 / R9150 / R9170, Ultegra 6770 / 6870, XTR M9070 and XT M8050 Di2 groupsets. Most regular installations require 6 cables:
• 2x 350mm from the shifters to the junction under your bars
• 1x 1200mm from the junction at your bars to the junction at the bottom bracket
• 1x 600mm from the junction to the battery
• 1x 350mm from the junction to the front derailleur
• 1x 600mm from the junction to the rear derailleur
This set-up uses the EW-90-A junction (3-port) under your bars and the SM-JC41 at the bottom bracket.
If you want to use so-called climbing shifters, then you'll require the 5-port junction under the bars, which is the EW-90-B.
Sprint shifters are plugged directly into the shifters and don't require a different junction.