To act in opposition to; to hinder, defeat, or frustrate, by contrary agency or influence; as, to counteract the effect of medicines; to counteract good advice
To counteract something means to reduce its effect by doing something that produces an opposite effect. My husband has to take several pills to counteract high blood pressure. to reduce or prevent the bad effect of something, by doing something that has the opposite effect