The police are allowed to give you the idea (you are required to refuse), they're allowed to give you the means (they can sell you the gun/drugs/etc.), they're allowed to create opportunities (bait cars), they're even allowed to become a part of the conspiracy with you and to lie to you about it (undercover agents).
What they're not allowed to do is to force your hand or corrupt someone who wasn't committing crimes to start.
So it's not going to count if the only reason they would have otherwise refused to commit the crime was because they were dealing with the cops and it's not going to count if the reasons they decided to commit the crime stem from their own wrongdoing. If you want to protect yourself from someone blackmailing you over criminal acts you've done, you turn yourself into the police. You don't hire a hitman and add yet another crime to the list.