Yes, Cassandra can store 20 billion or more individual pieces of data.
The maximum number of cells (rows x columns) in a single partition is 2 billion.
This is the limitation you alluded to, but it is more specific than your interpretation. Specifically that limit is for a single partition. Were you to insert the maximum 2 x 109 records into a partition, it would require a minimum of 10 separate partitions to, collectively, store the hypothetical 20B records. Creating 10 partitions is easy.
This is the answer to the "how" in the original question: Cassandra scales beyond this limitation when you, the application developer, split the data across multiple partitions.
In fact, a well-designed, healthy Cassandra cluster will consist of thousands or millions (or more) individual partitions. While each partition can theoretically contain a unique set of two billion data points, in practice you are unlikely to see partitions grow to be that large, and you should not design your schema with the intent to reach that limit. (After all, it is a limit and should be avoided.)
A single node (separate machine) in a Cassandra cluster can store multiple partitions, but the data for each partition must be able to reside completely within one node. That node must also perform sort operations on the partition when making changes to its data. You can probably imagine that sorting anywhere close to a billion data points will take measurable amounts of time. Instead, Cassandra intends you to scale "massively" by distributing the work by distributing the data across multiple nodes. Production clusters can easily consist of dozens, hundreds, or even thousands of individual nodes.
- Avoid getting anywhere close to the 2B/partition limit by splitting data across many partitions.
- Each node will be able to hold a finite number of partitions, based on the capacity of its disk.
- Avoid being limited by disk space by adding more nodes to your cluster, thus distributing the same data across more disks.