Yes, they really have that many capacitors in that small of an area.
There are two dominant technologies to do this: stacked capacitor DRAMs and trench capacitor DRAMs.
Stacked capacitors basically use a number of layers of metal and insulator to build a capacitor of reasonable capacity in a small surface area.
Trench capacitor DRAMs basically etch a "trench" (a deep, V-shaped one) in the silicon, the deposit a layer of metal, another of insulator, and another of metal.
Either way, you end up with a relatively large capacitance for the surface area. The capacitance is still quite small by most normal standards though. For example as of 2017, a Samsung DRAM has a capacitance around 7.4 fF per cell.
To get meaningful results from such a small capacitance, most DRAMs actually have some extra capacitors in addition to those used for the storage.
To read a cell, you charge one of these spare cells (one that's physically close to the cell you want to read) with approximately half the charge you'd use to store a
1 in a normal memory cell. One easy way to do that is to use two capacitor cells together, so feeding the same voltage and duration of charge pulse into them results in half the charge in the capacitor.
Then you read back the values from the spare cell and the memory cell and feed them both into a differential amplifier (the "sense amp"). This helps cancel most common mode noise on the bit lines, so the signal coming out of the sense amp is a fairly clean low or high value, with substantially better noise immunity (and from it, improved reliability) compared to just reading the voltage from the capacitor by itself.
In addition, a typical DRAM will have some extra banks of memory. When the chip is being tested at the factory, they may find that one of the normal banks of memory has a defect. If so, the chip will typically include some fuses (or anti-fuses) that can be blown to substitute a spare bank for the defective one, so a chip can still usually meet spec, despite a defect or two.
Thus, a DRAM chip will typically have even more capacitors than you get from computing its size based on what it's rated to hold (though, in all honesty, the increase is fairly small, at least as a percentage--though with something like a 32 GB memory, even a small percentage works out to an absolute number that's fairly large).
As a final note: a DRAM chip has to have a fair amount of circuitry (decoders, sense amps, etc.) in addition to the DRAM cells themselves. As a really simple rule of thumb, figure that the actual cells occupy about half the chip area, and the associated circuitry the other half.