In the picture above, five rangefinder units are visible. On the top of the forward superstructure is a main battery director, composed of an optical rangefinder topped with a rangefinding radar. A similar director sits atop the aft superstructure. Additionally, three boxes topped by radars are also rangefinders - again, they contain an optical and a radar rangefinder. (There's a 4th unit on the starboard side of the forward superstructure which isn't visible.) The smaller units were intended for use with the 5" guns, but data from them could be fed into the main gunfire computer.
IIRC, US gunfire radars were used for spotting shellfire (from battleships) starting in mid-1942. By 1944, US fire control systems were sophisticated enough to allow first salvo straddles of targets at distances of 35,000 yards. (Source for the latter:
http://www.combinedfleet.com/katori_t.htm .)
For some data on battleship fire control systems, see
http://www.combinedfleet.com/b_fire.htm
Turret mounted rangefinders were usually installed as backup units to the main (superstructure mounted) units. Note that many navies usually removed optical rangefinders in the lower main turret(s) later in the war. In part, this was a weight savings measure, but another reason was the reduced effectivity of a rangefinder mounted at a lower height.