Break the data matrix. Explore what Redis has to offer.
Counting can be achieved in a number of ways with Redis. The most obvious is INCR and friends (INCRBY, INCRBYFLOAT, HINCRBY, HINCRBYFLOAT, ZINCRBY) which have very obvious uses and use-cases by simply reading the documentation. Some of the non-obvious ways are with BITCOUNT and PFADD.