|Cassandra tools / Using CLI|
A counter table contains counter columns. A counter column is a specific kind of column whose user-visible value is a 64-bit signed integer that can be incremented (or decremented) by a client application. The counter column tracks the most recent value (or count) of all updates made to it. A counter column cannot be mixed in with regular columns of a table, you must create a table specifically to hold counters.
[default@demo] CREATE COLUMN FAMILY page_view_counts WITH default_validation_class=CounterColumnType AND key_validation_class=UTF8Type AND comparator=UTF8Type;
[default@demo] INCR page_view_counts['www.datastax.com'][home] BY 0;
[default@demo] INCR page_view_counts['www.datastax.com'][home] BY 1;