Uses tf_record_iterator(deprecated in TF2) to calculate dataset size in TF1.
Uses tf_record_iterator(deprecated in TF2) to calculate dataset size in TF1.

This is a workaround of memory allocation errors when we used graph mode calculation.

PiperOrigin-RevId: 345410262

tensorflow/tfx,tensorflow/tfx