In general, you should attend physical therapy until you reach your physical therapy goals or until your therapist and you decide that your condition is severe enough that your goals need to be re-evaluated. Typically, it takes about 6 to 8 weeks for soft tissue to heal, so your course of physical therapy may last about that long. Of course, if you have a serious condition or a progressively worsening condition, your course of rehab may take longer.
Sometimes, your condition may rapidly get better, and you may notice an improvement in pain control, range of motion, and strength within a few sessions of physical therapy. In this case, you may only attend therapy two or three times, and then hopefully be discharged with a home exercise program that can help you prevent or manage future episodes of your condition. https://www.nhs.uk/conditions/physiotherapy/accessing/