Dark matter relic abundance and scalar-tensor dark energy