Most of the ICOs don't even have a smart contract.
Smart contracts are generally there to regulate issuance and freezing of tokens rather than measuring a cap. Though some of them have an automation to transfer back the coins if the stated minimum amount is not collected.