An inequality is derived which gives an upper bound of the number of bound states in the l-th partial wave (l = 0, 1,…) of the two-body Schrödinger equation with a spherically symmetric potential function in the n-dimensional space (n = 1, 2,…). This is a generalization of Bargmann’s inequality for the case n = 3. The generalization is straightforward for the case n ≥ 1 with n = 2 and l ≥ 0 with n ≥ 3. After a mathematically rigorous justification of his heuristic argument, Schwinger’s method in his simple proof of Bargmann’s inequality is employed here. Newton’s result for the case l = –1/2, n = 3, which is equivalent to the case l = 0, n = 2, is reobtained.