Measurement of Chern numbers through center-of-mass responses