countsTab function

Counts sequences of length d+1 in a sample