fix the script
add the cout of the number of total entries of the chain