In the B-17G, the most heavily armed version, there were 13 .50s. Only 5 of these were single guns in flexible mounts, 1 on either side of the waist, 1 on either side of the nose, and 1 in the dorsal position about halfway between the top turret and vertical stabilizer. 8 of the guns were paired up in turrets under the chin, in the ball, in the tail and on top right behind the cockpit.
In the turrets, the guns were all in rigid mounts, the gunners hands did not touch the weapons, and these were the most effective weapons, able to track moving targets smoothly. The single guns were hands on in flexible mounts and not very effective unless a fighter got close.
The B-29s had 10 .50s and 1 20mm, all in rigid powered mounts, but by the time they came into service, there weren't enough effective fighters left to cause heavy losses to the high flying, fast moving B-29s.
In reality, one bomber on it's own was generally a dead duck, it's own armament was not enough to protect it against a more manuverable fighter. The best defense was massed firepower of all the guns in the bomber formation firing at attacking fighters, kill claims were highly exaggerated, with gunners from several bombers claiming the same kill.