While we can't find an official record on the guns that were used in WW1/WW2, you might want to check Militaryfactory.com, as they have total of (267) entries of WW1 / WW2 Guns (and Other Small Arms) which also includes portable weaponry such as hand grenades and mortars.
Here are some which earned a top position in ranking military weapons (they can also be viewed at the Armed Forces History Museum in Largo, FL in the Firearms & Ordnance Gallery):
Mauser Karabiner Kar 98k Bolt-Action Service Rifle (1935) - Nazi Germany
- This rifle was one of the last Mauser German designs. Its First Karabiner (98b) labeled as a carbine, not a rifle in order to fulfil guidelines of the Treaty of Versailles which forbid the Germans to produce rifles.
Lee-Enfield Bolt-Action, Magazine-Fed, Repeating (1895) - United Kingdom
- Easier and Faster Operations utilizing a “cok-on-closing” bolt along rear locking lugs. Shifted to cordite (a smokeless powder), which resulted in higher heat and additional pressure, which created a wear on the barrel’s rifling.
M1 Garand Gas-Operated; Self-Loading Rifle (1936) - United States
- Semi-automatic rifle – Initial design began in 1919; production of what would eventually be known as M1 Garand did not begin until 1932. Initial problems reported were easily correct and the rifle was standardized in January of 1936; received full backing of then Secretary of War and Army Chief of Staff – General Douglas MacArthur.
Springfield M1903 (Model 1903) Bolt-Action Rifle (1903) - United States
- Began as a design replacement for the Krag-Jorgensen rifle. Used the Krag and German Mauser as a basis for design. Though the M1903 incorporated several elements of prior weapons, the final design was still similar enough to the Mauser forcing the US Government to pay royalties to Mauserwerke.
Learn more about World War I and World War II, facts and summary information & articles, at Historynet.com.