add a copy counter and pass it to copy hooks