This function uses Rcpp sugar to implement a fast
table, for unique counts of a single vector.
Usage
counts(x)
Arguments
x
A numeric, integer, character or logical vector,
or a (potentially nested) list of such vectors. If
x is a list, we recursively apply counts
throughout elements in the list.