We carry out (with technical modifications) some cases of a procedure proposed by R. Langlands in Beyond Endoscopy. This gives a new proof of the classification of “dihedral forms” on GL(2), avoiding endoscopic methods: instead, it uses an infinite limiting process in the trace formula. We also explain the relationship of Langlands' idea to the results of  that count automorphic forms associated to Galois representations. We prove results of a similar nature over an arbitrary number field. The main tool is a version of the relative trace formula, namely a slight variant (for PGL(2)) of the Kuznetsov-Bruggeman-Miatello formula.