The question can be described in the following way:
Suppose I have a finite language $\mathcal{L}$ over alphabet $\Sigma$.
I have a string that is composed of a concatenated series of $n$ instances of $w_i$ chosen randomly(uniformly, independently) from $\mathcal{L}$. I want to find the number of occurrences of another word $W$ over the same alphabet, in that string.
Are there standard tools to handle this? It is a bit similar to type 2 binominal distribution, but not exactly the same.
In my case, I have $$\mathcal{L}=\{a,ab\}$$
And $$W=aba$$
Thanks!