Suppose we have a deck of card with numbers $1,\ldots,13$ totally $k$ times. (I mean if $k=4$ we have a standard deck). On every turn we check one card from the top of the pile and at the same time we increase the counter or set it to 1 if the counter is 14. How can we count the probability than at least once our counter shows the same value as the card? Or more generally, how can we count the probability than exactly $n$ times our counter shows the same value as the card?
I have no idea how this can be solved. I tried to find some useful recursion without lucky. I also read some basics of generating functions but found nothing useful.