Output the total number of index to a file