Amex subtracts out (most) credits and returns but there's a nasty problem that can still occur with returns. I can't find the flyertalk post that explains it in detail, however here's the gist: The Amex automated signup bonus system is programmed to deny the bonus if the specific threshold-clearing purchase is returned- even if susequent spend well exceeds the minimum spend.
For example, if you have spent $2995 of $3000, and you make a $10 purchase that is later returned, you will be denied the bonus even if you make a $100 purchase immediately afterwards and you're still within the minimum spend deadline. If this happens to you, it will require a lot of time-consuming follow-up and manual intervention to get fixed.