Is the action something that extends continuously, habitually, or regularly from the past to the present? That is, at any point in time between the start of the action and now, if you looked at what was happening, would this action be happening? If so, you need the continuous tense. Otherwise, don't use the continuous tense.
Look at the second example.
Marie has been in Stockholm for a few weeks now. She ..... with her friend Inga while she's there.
Was she staying with Inga 13 days ago? Yes.
Was she staying with Inga 12 days ago? Yes.
Was she staying with Inga ...
Was she staying with Inga two days ago? Yes.
Was she staying with Inga yesterday? Yes.
It seems that the action of "staying with Inga" has been "happening" continuously. So she has been staying with Inga while she's there.
______
Now take a look at Example 7.
I ... a couple of times before, but I just can't get the hang of it.
In my whole life I only played squash a couple of times, so that doesn't seem like a lot, does it?
Was I playing squash yesterday? Was I playing squash the day before? What about the day before that? What about the day before that? You would have to answer "Probably not" to each of these questions.
Obviously, I do not play squash regularly. I do not play habitually. The continuous tense does not apply. So I have played a couple of times before.
In general, you can't use the present perfect continuous when you have done something a certain number of times.
______
Now maybe you can try them all yourself.
CJ