Add index field to PartitionEnum class

index is incremented every time a partition is returned; thus, it gives
the number of partitions that have been enumerated so far.

reset() resets index to 0.

Issue #1