In short, this should be up to you.

If you are focussing on one issue, it will be a shorter time than if there are complexities, a personality disorder, diagnosed mental health conditions or multiple matters that you want to work through.

On occasions you may start off with a focussed concern but realise that there are other thoughts and feelings that also deserve attention.

Whenever therapy does not feel to be of benefit anymore it is a good idea to talk this through with your therapist, but if that does not resolve the issue, maybe a different approach or therapist is worth considering.

Or maybe you realise that you have reached the end of your journey, you are feeling much better, more resourceful and you have reached your aims within therapy.
We are all different and there should be no expectation that you ‘should be fixed’ within a certain amount of sessions. Go at your own pace.