P-51 had 6 x .50 cal
P-40 had 6 x .50 cal
P-47 had 8x .50 cal
F4F had: 4 × .50 cal
F6F had either 6× 0.50 cal BMG, or 2 × 20 mm and 4x .50 Cal BMG
F4U had 6 × 0.50 cal BMG, or 4 × 20 mm autocannons
Would a small number of 20mm cannons been more effective than 50 cal machine guns?
To understand why cannons weren't commonplace for American fighters, it's important to understand a few significant factors: weight, development, and doctrine/strategy.
Cannons were initially a major innovation for fighter aircraft in the early 1940s. This was most evident in the Battle of Britain where early models of the Hawker Hurricane and BF-109E would use large quantities of ammo to damage enemy aircraft. Pilots had to be extremely patient and disciplined to remain on an enemy's tail for long durations in dogfights and adept shots to aim for components that would disable the aircraft. Cannons allowed for a pilot to tear apart a target with only a few well placed shots. However, this came at a cost. The armaments added significant weight and lowered agility. In this case, the benefits outweighed the costs since smaller caliber rounds such as the German 7.92 mm often went through airframes with minimal damage.
While the skies in Europe were full of tracers, the sky in America was clear. American fighter development was frankly behind other countries in many aspects. At this point in time, the lack of cannons was a major disadvantage. The P-40 and the F4F really didn't have the capacity to carry heavier armaments without putting themselves at a major risk to being outmaneuvered. The next generation of fighters had potential with the development of the P 63 Cobra, (which was equipped with a 37 mm cannon) but this program fell short for a variety of unrelated reasons. There simply wasn't the push to evolve this generation of fighters. However, the reasoning for a lack of cannons changes as America enters the war.
In 1942, American fighters, most notably the F4F, were outmatched by nearly every variant of enemy fighters. Development was accelerated drastically as new aircraft were needed. The F6F was put into production with a 20 mm cannon, but the main focus of this fighter was an improved engine. The main focus of new fighters wasn't armament, but maneuverability. The P-51 was a major innovation in this aspect. It outmatched German aircraft significantly with the ability to out turn and overrun even the most sophisticated axis fighters.
By 1943, the answer to your question is simple. There was no longer a need to equip American planes with cannons for the following reasons:
Hopefully this answers your question.
Source: I am an aviation history enthusiast with experience in researching aircraft production and engineering. I am also in the process of training for aerospace maintenance for the U.S. Air Force.