don't rely on len(epochs) but use a counter as len can be unavailable when bad epochs have not already been dropped.