This part is made up of three pieces - two identical ball socket ends that fit the standard tow ball size, and a thin rod connecting the two that is freely rotating. This allows the two ends to rotate independently of each other. The visible section of the rod is three studs long, and each end is two studs long, making the whole assembly seven studs long. The pieces do not appear to be designed to be disassembled by the user, hence my assumption that it is a single part.
That is 4 separate parts. They can be disassembled, but they are somewhat fragile. The ends are part 6644 Technic Flex Cable End - Ball Connection with Cage:
The cable end includes a hinged door that allows flex system hose to be freely inserted or removed while the door is open. Once the door is in the closed position, the hose is locked in place. Here's what the part looks like with the door open:
If you're curious why you might want such a piece, it can be used to transfer translational motion down an irregular path. Here's and example from set 8412:
The part is first used to connect the flex system to the control stick inside the helicopter cockpit:
It's then used to connect one of the cables to the main rotor to provide pitch and roll control: