Guys help please

So I'm on the combined pill and I take it religiously at 10:30pm every night, if I had sex before I take my pill will it still be effective? Or does that count as a missed pill? So confused