add counter for record