Counting weeks

Can anybody explain how can i calculate weeks.is it after the lmp ends or lmp starts.my lmp was 17 jan.