diff --git a/ignite/engine.py b/ignite/engine.py
index f81753a1..aa7b2357 100644
--- a/ignite/engine.py
+++ b/ignite/engine.py
@@ -111,15 +111,16 @@ class Engine(object):
         try:
             start_time = time.time()
             for batch in dataset:
+                self.current_iteration += 1
                 self._fire_event(Events.ITERATION_STARTED)
                 step_result = self._process_function(batch)
                 if step_result is not None:
                     self.history.append(step_result)
 
-                self.current_iteration += 1
                 self._fire_event(Events.ITERATION_COMPLETED)
                 if self.should_terminate:
                     break
+
             time_taken = time.time() - start_time
             hours, mins, secs = _to_hours_mins_secs(time_taken)
             return hours, mins, secs
diff --git a/ignite/trainer.py b/ignite/trainer.py
index e06805af..f5f33c6c 100644
--- a/ignite/trainer.py
+++ b/ignite/trainer.py
@@ -67,12 +67,12 @@ class Trainer(Engine):
 
             self._fire_event(Events.STARTED)
             while self.current_epoch < max_epochs and not self.should_terminate:
+                self.current_epoch += 1
                 self._fire_event(Events.EPOCH_STARTED)
                 self._train_one_epoch(training_data)
                 if self.should_terminate:
                     break
                 self._fire_event(Events.EPOCH_COMPLETED)
-                self.current_epoch += 1
 
             self._fire_event(Events.COMPLETED)
             time_taken = time.time() - start_time

Start current_epoch + current_iteration from 1 instead of 0.
Also increment these counters *after* the `ITERATION_COMPLETE`/`EPOCH_COMPLETE` events.

See discussion in #59 for more details
diff --git a/tests/ignite/test_evaluator.py b/tests/ignite/test_evaluator.py
index b0c54408..4450e93e 100644
--- a/tests/ignite/test_evaluator.py
+++ b/tests/ignite/test_evaluator.py
@@ -14,7 +14,7 @@ def test_current_validation_iteration_counter_increases_every_iteration():
 
     class IterationCounter(object):
         def __init__(self):
-            self.current_iteration_count = 0
+            self.current_iteration_count = 1
             self.total_count = 0
 
         def __call__(self, evaluator):
@@ -23,7 +23,7 @@ def test_current_validation_iteration_counter_increases_every_iteration():
             self.total_count += 1
 
         def clear(self):
-            self.current_iteration_count = 0
+            self.current_iteration_count = 1
 
     iteration_counter = IterationCounter()
 
@@ -71,15 +71,15 @@ def test_terminate_stops_evaluator_when_called_during_iteration():
     iteration_to_stop = 3  # i.e. part way through the 3rd validation run
     evaluator = Evaluator(MagicMock(return_value=1))
 
-    def end_of_iteration_handler(evaluator):
+    def start_of_iteration_handler(evaluator):
         if evaluator.current_iteration == iteration_to_stop:
             evaluator.terminate()
 
-    evaluator.add_event_handler(Events.ITERATION_STARTED, end_of_iteration_handler)
+    evaluator.add_event_handler(Events.ITERATION_STARTED, start_of_iteration_handler)
     evaluator.run([None] * num_iterations)
 
-    # should complete the iteration when terminate called
-    assert evaluator.current_iteration == iteration_to_stop + 1
+    # should complete the iteration when terminate called but not increment counter
+    assert evaluator.current_iteration == iteration_to_stop
 
 
 def test_create_supervised():
diff --git a/tests/ignite/test_trainer.py b/tests/ignite/test_trainer.py
index b7b96177..8c3117c1 100644
--- a/tests/ignite/test_trainer.py
+++ b/tests/ignite/test_trainer.py
@@ -60,7 +60,7 @@ def test_current_epoch_counter_increases_every_epoch():
 
     class EpochCounter(object):
         def __init__(self):
-            self.current_epoch_count = 0
+            self.current_epoch_count = 1
 
         def __call__(self, trainer):
             assert trainer.current_epoch == self.current_epoch_count
@@ -80,7 +80,7 @@ def test_current_iteration_counter_increases_every_iteration():
 
     class IterationCounter(object):
         def __init__(self):
-            self.current_iteration_count = 0
+            self.current_iteration_count = 1
 
         def __call__(self, trainer):
             assert trainer.current_iteration == self.current_iteration_count
@@ -115,7 +115,7 @@ def test_terminate_at_end_of_epoch_stops_training():
 
     trainer.run([1], max_epochs=max_epochs)
 
-    assert trainer.current_epoch == last_epoch_to_run + 1  # counter is incremented at end of loop
+    assert trainer.current_epoch == last_epoch_to_run
     assert trainer.should_terminate
 
 
@@ -139,24 +139,23 @@ def test_terminate_at_start_of_epoch_stops_training_after_completing_iteration()
     assert trainer.current_epoch == epoch_to_terminate_on
     assert trainer.should_terminate
     # completes first iteration
-    assert trainer.current_iteration == (epoch_to_terminate_on * len(batches_per_epoch)) + 1
+    assert trainer.current_iteration == ((epoch_to_terminate_on - 1) * len(batches_per_epoch)) + 1
 
 
 def test_terminate_stops_training_mid_epoch():
     num_iterations_per_epoch = 10
-    iteration_to_stop = num_iterations_per_epoch + 3  # i.e. part way through the 2nd epoch
+    iteration_to_stop = num_iterations_per_epoch + 3  # i.e. part way through the 3rd epoch
     trainer = Trainer(MagicMock(return_value=1))
 
-    def end_of_iteration_handler(trainer):
+    def start_of_iteration_handler(trainer):
         if trainer.current_iteration == iteration_to_stop:
             trainer.terminate()
 
-    trainer.add_event_handler(Events.ITERATION_STARTED, end_of_iteration_handler)
+    trainer.add_event_handler(Events.ITERATION_STARTED, start_of_iteration_handler)
     trainer.run(training_data=[None] * num_iterations_per_epoch, max_epochs=3)
-    assert (trainer.current_iteration == iteration_to_stop +
-            1)  # completes the iteration when terminate called
-    assert trainer.current_epoch == np.ceil(
-        iteration_to_stop / num_iterations_per_epoch) - 1  # it starts from 0
+    # completes the iteration but doesn't increment counter (this happens just before a new iteration starts)
+    assert (trainer.current_iteration == iteration_to_stop)
+    assert trainer.current_epoch == np.ceil(iteration_to_stop / num_iterations_per_epoch)  # it starts from 0
 
 
 def _create_mock_data_loader(epochs, batches_per_epoch):
@@ -199,7 +198,7 @@ def test_training_iteration_events_are_fired():
     assert mock_manager.mock_calls == expected_calls
 
 
-def test_create_supervised():
+def test_create_supervised_trainer():
     model = Linear(1, 1)
     model.weight.data.zero_()
     model.bias.data.zero_()

pip install -e .
parse_log_pytest
pytest
numpy mock pytest codecov pytest-cov tqdm scikit-learn visdom torchvision tensorboardX gym
apt-get update apt-get install -y gcc
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
certifi==2021.5.30
charset-normalizer==2.0.12
cloudpickle==2.2.1
codecov==2.1.13
coverage==6.2
dataclasses==0.8
decorator==4.4.2
enum34==1.1.10
gym==0.26.2
gym-notices==0.0.8
idna==3.10
-e git+https://github.com/pytorch/ignite.git@a0235df55650ec5368c0cd9f84a3a34b92c37273#egg=ignite
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work
importlib-resources==5.4.0
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
joblib==1.1.1
jsonpatch==1.32
jsonpointer==2.3
mock==5.2.0
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
networkx==2.5.1
numpy==1.19.5
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
Pillow==8.4.0
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
protobuf==4.21.0
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==6.2.4
pytest-cov==4.0.0
requests==2.27.1
scikit-learn==0.24.2
scipy==1.5.4
six==1.17.0
tensorboardX==2.6.2.2
threadpoolctl==3.1.0
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
tomli==1.2.3
torch==1.10.1
torchvision==0.11.2
tornado==6.1
tqdm==4.64.1
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
urllib3==1.26.20
visdom==0.2.4
websocket-client==1.3.1
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

name: ignite
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib-metadata=4.8.1=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - charset-normalizer==2.0.12
      - cloudpickle==2.2.1
      - codecov==2.1.13
      - coverage==6.2
      - dataclasses==0.8
      - decorator==4.4.2
      - enum34==1.1.10
      - gym==0.26.2
      - gym-notices==0.0.8
      - idna==3.10
      - importlib-resources==5.4.0
      - joblib==1.1.1
      - jsonpatch==1.32
      - jsonpointer==2.3
      - mock==5.2.0
      - networkx==2.5.1
      - numpy==1.19.5
      - pillow==8.4.0
      - protobuf==4.21.0
      - pytest-cov==4.0.0
      - requests==2.27.1
      - scikit-learn==0.24.2
      - scipy==1.5.4
      - six==1.17.0
      - tensorboardx==2.6.2.2
      - threadpoolctl==3.1.0
      - tomli==1.2.3
      - torch==1.10.1
      - torchvision==0.11.2
      - tornado==6.1
      - tqdm==4.64.1
      - urllib3==1.26.20
      - visdom==0.2.4
      - websocket-client==1.3.1
prefix: /opt/conda/envs/ignite

tests/ignite/test_evaluator.py::test_current_validation_iteration_counter_increases_every_iteration tests/ignite/test_evaluator.py::test_terminate_stops_evaluator_when_called_during_iteration tests/ignite/test_trainer.py::test_current_epoch_counter_increases_every_epoch tests/ignite/test_trainer.py::test_current_iteration_counter_increases_every_iteration tests/ignite/test_trainer.py::test_terminate_at_end_of_epoch_stops_training tests/ignite/test_trainer.py::test_terminate_at_start_of_epoch_stops_training_after_completing_iteration tests/ignite/test_trainer.py::test_terminate_stops_training_mid_epoch
tests/ignite/test_trainer.py::test_create_supervised_trainer
tests/ignite/test_evaluator.py::test_evaluation_iteration_events_are_fired tests/ignite/test_evaluator.py::test_create_supervised tests/ignite/test_trainer.py::test_exception_handler_called_on_error tests/ignite/test_trainer.py::test_stopping_criterion_is_max_epochs tests/ignite/test_trainer.py::test_training_iteration_events_are_fired
ignite/engine.py ignite/trainer.py
ignite/engine.py ignite/trainer.py