How is the weeks you're pregnant determined

Brenda
I just recently found out I was pregnant last week Sunday. Idk how many weeks I am yet but I have a doctors appointment tomorrow. Anyone know how they determine how many weeks?? Because idk when my last period was and they were always irregular so I have no clue how she will figure it out.