Combinatorics and number theory of counting sequences. (2019)