Apps calculating weeks?

I always thought the amount of weeks you are is counted from the first day of your last period? I have apps that say I’m 5 weeks today and other that I am 4 weeks 4 days? So confused. What is correct? My first prenatal appointment is on Wednesday.