script to update num_tags column