When to test ?

How many days after sex can you take a pregnancy test ?