How do I act after quantity change in cart?
You could use the Entity API type hooks (load, presave, update etc..) to act when the commerce_line_item is updated

e.g: 

/**
 * Implements hook_entity_update
 */
function MYMODULE_entity_update($entity, $type){

  if($type == 'commerce_line_item'){
    // Do stuff with line item in $entity;
  }

}


You might have access to $entity-&gt;unchanged or similar in $entity which stores the entity content prior to the save. Useful for comparing quantity to see if it's changed!

dpm($entity); // for details.


You can also use hook_ENTITY_TYPE_update

/**
 * Implements hook_ENTITY_TYPE_update
 */
function MYMODULE_commerce_line_item_update($entity){

  dpm($entity);

}


The hooks for load, presave, insert, update and delete are available for all Commerce entity types.