A method of assaying nucleic acids in a sample, comprising the steps of: a) adding multiple sets of probes into the sample to form a mixture, each set of probes comprising: i. a first probe having a first portion at least partially complementary to a first region of a target nucleic acid in the sample and a second portion forming a first primer binding site; ii. a second probe having a first portion at least partially complementary to a second region of the target nucleic acid in the sample and a second portion forming a second primer binding site, wherein the 5' end of the first probe is adjacent to the 3' end of the second probe when both probes are hybridized to the target nucleic acid; b) denaturing nucleic acids in the mixture; c) hybridizing the set of probes to the complementary regions of the target nucleic acid; d) performing a ligation reaction with a ligase enzyme on the set of hybridized probes to connect the adjacent 5' end of the first probe and the 3' end of the second probe to form a third probe, wherein steps b-d are repeated 1-100 times; e) amplifying the third probe with multiple sets of primers to obtain an amplification product, each set of primers comprising: i. a first primer at least partially complementary to the first primer binding site in one or more first probes of the multiple sets of probes; ii. a second primer at least partially complementary to the second primer binding site in one or more second probes of the multiple sets of probes; f) assaying the presence, absence or quantity of the target nucleic acid in the sample by determining the presence, absence or quantity of the third probe in the amplification product; and wherein at least one primer of each set of primers is labeled with a detectable moiety; and at least one primer of the multiple sets of primers includes a stuffer sequence; and at least one probe of the multiple sets of probes includes a stuffer sequence, wherein the measurement is carried out using capillary electrophoresis. a) adding multiple sets of probes into the sample to form a mixture, each set of probes comprising: i. a first probe having a first portion at least partially complementary to a first region of a target nucleic acid in the sample and a second portion forming a first primer binding site; ii. a second probe having a first portion at least partially complementary to a second region of the target nucleic acid in the sample and a second portion forming a second primer binding site, wherein the 5' end of the first probe is adjacent to the 3' end of the second probe when both probes are hybridized to the target nucleic acid; i. a first probe having a first portion at least partially complementary to a first region of a target nucleic acid in the sample and a second portion forming a first primer binding site; ii. a second probe having a first portion at least partially complementary to a second region of the target nucleic acid in the sample and a second portion forming a second primer binding site, wherein the 5' end of the first probe is adjacent to the 3' end of the second probe when both probes are hybridized to the target nucleic acid; b) denaturing nucleic acids in the mixture; c) hybridizing the set of probes to the complementary regions of the target nucleic acid; d) performing a ligation reaction with a ligase enzyme on the set of hybridized probes to connect the adjacent 5' end of the first probe and the 3' end of the second probe to form a third probe, wherein steps b-d are repeated 1-100 times; e) amplifying the third probe with multiple sets of primers to obtain an amplification product, each set of primers comprising: i. a first primer at least partially complementary to the first primer binding site in one or more first probes of the multiple sets of probes; ii. a second primer at least partially complementary to the second primer binding site in one or more second probes of the multiple sets of probes; i. a first primer at least partially complementary to the first primer binding site in one or more first probes of the multiple sets of probes; ii. a second primer at least partially complementary to the second primer binding site in one or more second probes of the multiple sets of probes; f) assaying the presence, absence or quantity of the target nucleic acid in the sample by determining the presence, absence or quantity of the third probe in the amplification product; and