Modify counter and histogram