Helicobacter pylori (H. pylori) is bacteria considered to be present in half of the population and it is a public health problem worldwide. Most patients infected with H. pylori show no clinical symptoms; nonetheless, approximately 10% to 20% of these patients will develop peptic ulcers and 1% will develop gastric cancer. The International Agency for Research on Cancer has classified H. pylori as a Group 1 carcinogen, recognized as the only bacteria capable of producing cancer. Samples of drinking water (n = 44) from aqueducts with chlorination treatment in selected areas with high prevalence of gastric cancer were analyzed in Costa Rica. Samples of drinking water from Panamá (n = 44) from aqueducts supplying untreated water for human consumption in the province of Chiriquí were also analyzed. The molecular marker of H. pylori, glmM, was used, and to optimize the Real Time PCR (qPCR) technique, annealing temperature, concentration of primers and probe were standardized; also, by analyzing different standard curves, the best reaction conditions that allowed detecting and quantifying the gene were determined. The LightCycler® 480 II (LC480II) equipment from Roche Diagnostics GmbH was used, as well as the Absolute Quantification Analysis by means of the Second Derivative Maximum Method. In the case of the samples from Costa Rica, it was determined that 79.5% were positive for H. pylori; removing outlier high average, quantification of bacteria was determined in 3.6 × 103 copies/100 mL. For Panamá it was determined that 86% of the samples were found positive for the presence of H. pylori; removing outlier high average quantification of bacteria was determined at 3.3 × 102 copies/100 mL. The difference in values between the aqueducts in both countries revealed an environmental distribution of the bacteria of epidemiological interest in each case.