The length of your treatment will very much depend on your unique circumstances and needs, with six sessions often recommended and a review after that.
It also depends on the type of therapy you choose to try. Cognitive behavioural therapy is designed to be short-term and lasts six to 20 sessions. Psychodynamic, psychoanalytic, and existential therapies tend to be longer term, and many last for many months or even years.
Keep in mind that once you start sessions, new issues and angles can arise you were not aware existed that you then want to explore. It is of course possible to also see improvement faster than you expected.