Days past ovulation

Can someone explain to me how counting dpo works? Glow shows ovulation days as green dots. Do I start counting at the first green dot? Also, How long should I wait to take a preg test?