How to count weeks?

Ash
I have a couple of apps and some say I'm two weeks, some say four? Just wondering how the gps / midwives will calculate the date for dating scan. Thanks for your help!