Medications such as aspirin, clopidogrel, and heparin can affect platelet function or count by inhibiting platelet activation or aggregation. These medications are often used to prevent blood clots in patients at high risk of thrombosis.