You can .__dict__ any object in python (AFAIK) this shows its variables and methods. "batches.__dict__"
I can see lowercase ‘n’ in my ImageDataGenerator "‘n’: 19507,"
Maybe you can use this lowercase ‘n’ instead of upper case.
From keras documentation we can see that second argument of predict_generator is ‘steps’.
"Total number of steps (batches of samples) to yield from generator before stopping" https://keras.io/models/sequential/#predict_generator
So this would be correct if your batch size is 1.
I think you have to divide this with your batch size to get correct shape of your output.
Keras code changes a lot, I could not find good documentation of previous versions.