That is all very bizarre. There are a few different things going on here. Yes, an officer can follow anyone who's driving down the street. He doesn't even need a reason. But, if the search warrant is for the house, he's allowed to enter the house. That doesn't give them a right to detain you nowhere near the house and drag you back - there's no need, since they could enter the house at that point without your present. They would need an arrest warrant to take you into custody and take you back to the house. It doesn't sound like they had one.
A criminal defendant cannot counterclaim against the prosecutor. He actually can't sue the prosecutor at all, because the prosecution has immunity when he's doing his job. It sounds like the police officer is the one who violated your rights, so that's who your case is against. There is no civil cause of action for perjury, but if you can prove that the officer lied, you can ask the DA to investigate (not the same one who is prosecuting you - file a complaint
with the office). What you're talking about is a violation of the Civil Rights Act of 1983.
With that said, if the search warrant was invalid, or your rights were otherwise violated in the obtaining or execution of the warrant, you have another remedy - you can have your attorney file a Motion to Suppress. He'll be able to try to get the warrant thrown out, and all evidence obtained a result suppressed. That usually comes before a civil rights case would be filed.
Please rate my service positively before signing out, as this is the only way that I get credit for the time I spend helping you. I hope that you are 100% satisfied - otherwise, please reply so we can continue the conversation. Good luck.