diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index 6fbb688..0d27c4b 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -51,6 +51,7 @@
 protected:
   FaceTable faceTable;
   Forwarder forwarder{faceTable};
+  const ForwarderCounters& counters{forwarder.getCounters()};
 };
 
 BOOST_AUTO_TEST_SUITE(Fw)
@@ -65,39 +66,53 @@
   fib::Entry* entry = fib.insert("/A").first;
   fib.addOrUpdateNextHop(*entry, *face2, 0);
 
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nInInterests, 0);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nOutInterests, 0);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nCsHits, 0);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nCsMisses, 0);
+  BOOST_CHECK_EQUAL(counters.nInInterests, 0);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 0);
+  BOOST_CHECK_EQUAL(counters.nInData, 0);
+  BOOST_CHECK_EQUAL(counters.nOutData, 0);
+  BOOST_CHECK_EQUAL(counters.nInNacks, 0);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 0);
+  BOOST_CHECK_EQUAL(counters.nSatisfiedInterests, 0);
+  BOOST_CHECK_EQUAL(counters.nUnsatisfiedInterests, 0);
+  BOOST_CHECK_EQUAL(counters.nUnsolicitedData, 0);
+  BOOST_CHECK_EQUAL(counters.nCsHits, 0);
+  BOOST_CHECK_EQUAL(counters.nCsMisses, 0);
+
   face1->receiveInterest(*makeInterest("/A/B"));
   this->advanceClocks(100_ms, 1_s);
   BOOST_REQUIRE_EQUAL(face2->sentInterests.size(), 1);
   BOOST_CHECK_EQUAL(face2->sentInterests[0].getName(), "/A/B");
   BOOST_REQUIRE(face2->sentInterests[0].getTag<lp::IncomingFaceIdTag>() != nullptr);
   BOOST_CHECK_EQUAL(*face2->sentInterests[0].getTag<lp::IncomingFaceIdTag>(), face1->getId());
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nInInterests, 1);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nOutInterests, 1);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nCsHits, 0);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nCsMisses, 1);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nSatisfiedInterests, 0);
+  BOOST_CHECK_EQUAL(counters.nInInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nInData, 0);
+  BOOST_CHECK_EQUAL(counters.nOutData, 0);
+  BOOST_CHECK_EQUAL(counters.nSatisfiedInterests, 0);
+  BOOST_CHECK_EQUAL(counters.nUnsatisfiedInterests, 0);
+  BOOST_CHECK_EQUAL(counters.nCsHits, 0);
+  BOOST_CHECK_EQUAL(counters.nCsMisses, 1);
 
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nInData, 0);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nOutData, 0);
   face2->receiveData(*makeData("/A/B"));
   this->advanceClocks(100_ms, 1_s);
   BOOST_REQUIRE_EQUAL(face1->sentData.size(), 1);
   BOOST_CHECK_EQUAL(face1->sentData[0].getName(), "/A/B");
   BOOST_REQUIRE(face1->sentData[0].getTag<lp::IncomingFaceIdTag>() != nullptr);
   BOOST_CHECK_EQUAL(*face1->sentData[0].getTag<lp::IncomingFaceIdTag>(), face2->getId());
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nInData, 1);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nOutData, 1);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nInNacks, 0);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nOutNacks, 0);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nSatisfiedInterests, 1);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 0);
+  BOOST_CHECK_EQUAL(counters.nInInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nInData, 1);
+  BOOST_CHECK_EQUAL(counters.nOutData, 1);
+  BOOST_CHECK_EQUAL(counters.nInNacks, 0);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 0);
+  BOOST_CHECK_EQUAL(counters.nSatisfiedInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nUnsatisfiedInterests, 0);
+  BOOST_CHECK_EQUAL(counters.nUnsolicitedData, 0);
+  BOOST_CHECK_EQUAL(counters.nCsHits, 0);
+  BOOST_CHECK_EQUAL(counters.nCsMisses, 1);
 }
 
-BOOST_AUTO_TEST_CASE(CsMatched)
+BOOST_AUTO_TEST_CASE(CsHit)
 {
   auto face1 = addFace();
   auto face2 = addFace();
@@ -114,24 +129,35 @@
   data->setTag(make_shared<lp::IncomingFaceIdTag>(face3->getId()));
   forwarder.getCs().insert(*data);
 
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nCsHits, 0);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nCsMisses, 0);
+  BOOST_CHECK_EQUAL(counters.nCsHits, 0);
+  BOOST_CHECK_EQUAL(counters.nCsMisses, 0);
+
   face1->receiveInterest(*makeInterest("/A", true));
   this->advanceClocks(1_ms, 5_ms);
   // Interest matching ContentStore should not be forwarded
-  BOOST_REQUIRE_EQUAL(face2->sentInterests.size(), 0);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nCsHits, 1);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nCsMisses, 0);
+  BOOST_CHECK_EQUAL(face2->sentInterests.size(), 0);
+  BOOST_CHECK_EQUAL(counters.nInInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 0);
+  BOOST_CHECK_EQUAL(counters.nInNacks, 0);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 0);
+  BOOST_CHECK_EQUAL(counters.nCsHits, 1);
+  BOOST_CHECK_EQUAL(counters.nCsMisses, 0);
 
   BOOST_REQUIRE_EQUAL(face1->sentData.size(), 1);
   // IncomingFaceId field should be reset to represent CS
   BOOST_CHECK_EQUAL(face1->sentData[0].getName(), "/A/B");
   BOOST_REQUIRE(face1->sentData[0].getTag<lp::IncomingFaceIdTag>() != nullptr);
   BOOST_CHECK_EQUAL(*face1->sentData[0].getTag<lp::IncomingFaceIdTag>(), face::FACEID_CONTENT_STORE);
+  BOOST_CHECK_EQUAL(counters.nInData, 0);
+  BOOST_CHECK_EQUAL(counters.nOutData, 1);
 
   this->advanceClocks(100_ms, 500_ms);
   // PIT entry should not be left behind
   BOOST_CHECK_EQUAL(pit.size(), 0);
+
+  BOOST_CHECK_EQUAL(counters.nSatisfiedInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nUnsatisfiedInterests, 0);
+  BOOST_CHECK_EQUAL(counters.nUnsolicitedData, 0);
 }
 
 BOOST_AUTO_TEST_CASE(InterestWithoutNonce)
@@ -148,9 +174,12 @@
   face1->receiveInterest(*interest);
 
   // Ensure Nonce added if incoming packet did not have Nonce
-  BOOST_REQUIRE_EQUAL(face2->getCounters().nOutInterests, 1);
   BOOST_REQUIRE_EQUAL(face2->sentInterests.size(), 1);
-  BOOST_CHECK_EQUAL(face2->sentInterests.back().hasNonce(), true);
+  BOOST_CHECK_EQUAL(face2->sentInterests[0].hasNonce(), true);
+  BOOST_CHECK_EQUAL(face2->getCounters().nOutInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nInInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 0);
 }
 
 BOOST_AUTO_TEST_CASE(OutgoingInterest)
@@ -175,7 +204,9 @@
   BOOST_CHECK(outA3 == nullptr);
 
   BOOST_REQUIRE_EQUAL(face2->sentInterests.size(), 1);
-  BOOST_CHECK_EQUAL(face2->sentInterests.back().getNonce(), 1698);
+  BOOST_CHECK_EQUAL(face2->sentInterests[0].getNonce(), 1698);
+  BOOST_CHECK_EQUAL(counters.nInInterests, 0);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 1);
 }
 
 BOOST_AUTO_TEST_CASE(NextHopFaceId)
@@ -195,7 +226,10 @@
   this->advanceClocks(100_ms, 1_s);
   BOOST_CHECK_EQUAL(face3->sentInterests.size(), 0);
   BOOST_REQUIRE_EQUAL(face2->sentInterests.size(), 1);
-  BOOST_CHECK_EQUAL(face2->sentInterests.front().getName(), "/A/B");
+  BOOST_CHECK_EQUAL(face2->sentInterests[0].getName(), "/A/B");
+  BOOST_CHECK_EQUAL(counters.nInInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 0);
 }
 
 BOOST_AUTO_TEST_CASE(HopLimit)
@@ -217,7 +251,9 @@
   BOOST_CHECK_EQUAL(faceRemote->getCounters().nInHopLimitZero, 0);
   BOOST_CHECK_EQUAL(faceRemote->getCounters().nOutHopLimitZero, 0);
   BOOST_REQUIRE_EQUAL(faceRemote->sentInterests.size(), 1);
-  BOOST_CHECK(!faceRemote->sentInterests.back().getHopLimit());
+  BOOST_CHECK(!faceRemote->sentInterests[0].getHopLimit());
+  BOOST_CHECK_EQUAL(counters.nInInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 1);
 
   // Incoming interest w/ HopLimit > 1 will not be dropped on send/receive
   auto interestHopLimit2 = makeInterest("/remote/ijklmnop");
@@ -228,8 +264,10 @@
   BOOST_CHECK_EQUAL(faceRemote->getCounters().nInHopLimitZero, 0);
   BOOST_CHECK_EQUAL(faceRemote->getCounters().nOutHopLimitZero, 0);
   BOOST_REQUIRE_EQUAL(faceRemote->sentInterests.size(), 2);
-  BOOST_REQUIRE(faceRemote->sentInterests.back().getHopLimit());
-  BOOST_CHECK_EQUAL(*faceRemote->sentInterests.back().getHopLimit(), 1);
+  BOOST_REQUIRE(faceRemote->sentInterests[1].getHopLimit());
+  BOOST_CHECK_EQUAL(*faceRemote->sentInterests[1].getHopLimit(), 1);
+  BOOST_CHECK_EQUAL(counters.nInInterests, 2);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 2);
 
   // Incoming interest w/ HopLimit == 1 will be dropped on send path if going out on remote face
   auto interestHopLimit1Remote = makeInterest("/remote/qrstuvwx");
@@ -240,6 +278,8 @@
   BOOST_CHECK_EQUAL(faceRemote->getCounters().nInHopLimitZero, 0);
   BOOST_CHECK_EQUAL(faceRemote->getCounters().nOutHopLimitZero, 1);
   BOOST_CHECK_EQUAL(faceRemote->sentInterests.size(), 2);
+  BOOST_CHECK_EQUAL(counters.nInInterests, 3);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 2);
 
   // Incoming interest w/ HopLimit == 1 will not be dropped on send path if going out on local face
   auto interestHopLimit1Local = makeInterest("/local/abcdefgh");
@@ -250,8 +290,10 @@
   BOOST_CHECK_EQUAL(faceLocal->getCounters().nInHopLimitZero, 0);
   BOOST_CHECK_EQUAL(faceLocal->getCounters().nOutHopLimitZero, 0);
   BOOST_REQUIRE_EQUAL(faceLocal->sentInterests.size(), 1);
-  BOOST_REQUIRE(faceLocal->sentInterests.back().getHopLimit());
-  BOOST_CHECK_EQUAL(*faceLocal->sentInterests.back().getHopLimit(), 0);
+  BOOST_REQUIRE(faceLocal->sentInterests[0].getHopLimit());
+  BOOST_CHECK_EQUAL(*faceLocal->sentInterests[0].getHopLimit(), 0);
+  BOOST_CHECK_EQUAL(counters.nInInterests, 4);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 3);
 
   // Interest w/ HopLimit == 0 will be dropped on receive path
   auto interestHopLimit0 = makeInterest("/remote/yzabcdef");
@@ -262,6 +304,10 @@
   BOOST_CHECK_EQUAL(faceIn->getCounters().nInHopLimitZero, 1);
   BOOST_CHECK_EQUAL(faceRemote->getCounters().nOutHopLimitZero, 1);
   BOOST_CHECK_EQUAL(faceRemote->sentInterests.size(), 2);
+  BOOST_CHECK_EQUAL(counters.nInInterests, 5);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 3);
+
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 0);
 }
 
 BOOST_AUTO_TEST_CASE(AddDefaultHopLimit)
@@ -302,52 +348,63 @@
   auto face2 = addFace(); // default is non-local
 
   auto& strategy = choose<DummyStrategy>(forwarder, "/", DummyStrategy::getStrategyName());
+  strategy.afterReceiveInterest_count = 0;
 
   // local face, /localhost: OK
-  strategy.afterReceiveInterest_count = 0;
   auto i1 = makeInterest("/localhost/A1");
   forwarder.onIncomingInterest(*i1, FaceEndpoint(*face1));
+  BOOST_CHECK_EQUAL(counters.nInInterests, 1);
   BOOST_CHECK_EQUAL(strategy.afterReceiveInterest_count, 1);
 
   // non-local face, /localhost: violate
-  strategy.afterReceiveInterest_count = 0;
   auto i2 = makeInterest("/localhost/A2");
   forwarder.onIncomingInterest(*i2, FaceEndpoint(*face2));
-  BOOST_CHECK_EQUAL(strategy.afterReceiveInterest_count, 0);
+  BOOST_CHECK_EQUAL(counters.nInInterests, 2);
+  BOOST_CHECK_EQUAL(strategy.afterReceiveInterest_count, 1);
 
   // local face, non-/localhost: OK
-  strategy.afterReceiveInterest_count = 0;
   auto i3 = makeInterest("/A3");
   forwarder.onIncomingInterest(*i3, FaceEndpoint(*face1));
-  BOOST_CHECK_EQUAL(strategy.afterReceiveInterest_count, 1);
+  BOOST_CHECK_EQUAL(counters.nInInterests, 3);
+  BOOST_CHECK_EQUAL(strategy.afterReceiveInterest_count, 2);
 
   // non-local face, non-/localhost: OK
-  strategy.afterReceiveInterest_count = 0;
   auto i4 = makeInterest("/A4");
   forwarder.onIncomingInterest(*i4, FaceEndpoint(*face2));
-  BOOST_CHECK_EQUAL(strategy.afterReceiveInterest_count, 1);
+  BOOST_CHECK_EQUAL(counters.nInInterests, 4);
+  BOOST_CHECK_EQUAL(strategy.afterReceiveInterest_count, 3);
 
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 0);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 0);
+  BOOST_CHECK_EQUAL(counters.nInData, 0);
+  BOOST_CHECK_EQUAL(counters.nOutData, 0);
+  BOOST_CHECK_EQUAL(counters.nUnsolicitedData, 0);
 
   // local face, /localhost: OK
   auto d1 = makeData("/localhost/B1");
   forwarder.onIncomingData(*d1, FaceEndpoint(*face1));
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 1);
+  BOOST_CHECK_EQUAL(counters.nInData, 1);
+  BOOST_CHECK_EQUAL(counters.nUnsolicitedData, 1);
 
   // non-local face, /localhost: violate
   auto d2 = makeData("/localhost/B2");
   forwarder.onIncomingData(*d2, FaceEndpoint(*face2));
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 1);
+  BOOST_CHECK_EQUAL(counters.nInData, 2);
+  BOOST_CHECK_EQUAL(counters.nUnsolicitedData, 1);
 
   // local face, non-/localhost: OK
   auto d3 = makeData("/B3");
   forwarder.onIncomingData(*d3, FaceEndpoint(*face1));
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 2);
+  BOOST_CHECK_EQUAL(counters.nInData, 3);
+  BOOST_CHECK_EQUAL(counters.nUnsolicitedData, 2);
 
   // non-local face, non-/localhost: OK
   auto d4 = makeData("/B4");
   forwarder.onIncomingData(*d4, FaceEndpoint(*face2));
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 3);
+  BOOST_CHECK_EQUAL(counters.nInData, 4);
+  BOOST_CHECK_EQUAL(counters.nUnsolicitedData, 3);
+
+  BOOST_CHECK_EQUAL(counters.nOutData, 0);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 0);
 }
 
 BOOST_AUTO_TEST_CASE(IncomingInterestStrategyDispatch)
@@ -386,6 +443,17 @@
   forwarder.onIncomingInterest(*interest3, FaceEndpoint(*face1));
   auto interest4 = makeInterest("/B/4", false, 5_s);
   forwarder.onIncomingInterest(*interest4, FaceEndpoint(*face1));
+
+  this->advanceClocks(1_ms, 5_ms);
+
+  BOOST_CHECK_EQUAL(counters.nInInterests, 4);
+  BOOST_CHECK_EQUAL(counters.nInData, 2);
+  BOOST_CHECK_EQUAL(counters.nInNacks, 0);
+  BOOST_CHECK_EQUAL(counters.nSatisfiedInterests, 2);
+  BOOST_CHECK_EQUAL(counters.nUnsatisfiedInterests, 0);
+  BOOST_CHECK_EQUAL(counters.nUnsolicitedData, 0);
+  BOOST_CHECK_EQUAL(counters.nCsHits, 0);
+  BOOST_CHECK_EQUAL(counters.nCsMisses, 4);
 }
 
 BOOST_AUTO_TEST_CASE(IncomingData)
@@ -417,9 +485,11 @@
   BOOST_CHECK_EQUAL(face3->sentData.size(), 0);
   BOOST_CHECK_EQUAL(face4->sentData.size(), 1);
 
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nInData, 1);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nOutData, 3);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 0);
+  BOOST_CHECK_EQUAL(counters.nInData, 1);
+  BOOST_CHECK_EQUAL(counters.nOutData, 3);
+  BOOST_CHECK_EQUAL(counters.nSatisfiedInterests, 3);
+  BOOST_CHECK_EQUAL(counters.nUnsatisfiedInterests, 0);
+  BOOST_CHECK_EQUAL(counters.nUnsolicitedData, 0);
 }
 
 BOOST_AUTO_TEST_CASE(OutgoingData)
@@ -435,7 +505,9 @@
   face1->sentData.clear();
   BOOST_CHECK(forwarder.onOutgoingData(*data, *face1));
   BOOST_REQUIRE_EQUAL(face1->sentData.size(), 1);
-  BOOST_CHECK_EQUAL(face1->sentData.back().getName(), data->getName());
+  BOOST_CHECK_EQUAL(face1->sentData[0].getName(), data->getName());
+  BOOST_CHECK_EQUAL(counters.nInData, 0);
+  BOOST_CHECK_EQUAL(counters.nOutData, 1);
 
   // scope control
   face1->sentData.clear();
@@ -444,12 +516,16 @@
   BOOST_CHECK_EQUAL(face2->sentData.size(), 0);
   BOOST_CHECK(forwarder.onOutgoingData(*localData, *face1));
   BOOST_REQUIRE_EQUAL(face1->sentData.size(), 1);
-  BOOST_CHECK_EQUAL(face1->sentData.back().getName(), localData->getName());
+  BOOST_CHECK_EQUAL(face1->sentData[0].getName(), localData->getName());
+  BOOST_CHECK_EQUAL(counters.nInData, 0);
+  BOOST_CHECK_EQUAL(counters.nOutData, 2);
 
   // face with invalid ID
   face3->sentData.clear();
   BOOST_CHECK(!forwarder.onOutgoingData(*data, *face3));
   BOOST_CHECK_EQUAL(face3->sentData.size(), 0);
+  BOOST_CHECK_EQUAL(counters.nInData, 0);
+  BOOST_CHECK_EQUAL(counters.nOutData, 2);
 }
 
 BOOST_AUTO_TEST_CASE(IncomingNack)
@@ -529,6 +605,13 @@
   forwarder.onIncomingNack(nack4a, FaceEndpoint(*face3));
   BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
+
+  this->advanceClocks(1_ms, 10_ms);
+
+  BOOST_CHECK_EQUAL(counters.nInNacks, 6);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 0);
+  BOOST_CHECK_EQUAL(counters.nSatisfiedInterests, 0);
+  BOOST_CHECK_EQUAL(counters.nUnsatisfiedInterests, 2);
 }
 
 BOOST_AUTO_TEST_CASE(OutgoingNack)
@@ -555,6 +638,7 @@
   face2->sentNacks.clear();
   BOOST_CHECK(!forwarder.onOutgoingNack(nackHeader, *face2, pit1));
   BOOST_CHECK_EQUAL(face2->sentNacks.size(), 0);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 0);
 
   // send Nack with correct Nonce
   auto interest2a = makeInterest("/Vi8tRm9MG3", false, std::nullopt, 152);
@@ -567,9 +651,10 @@
 
   BOOST_CHECK(forwarder.onOutgoingNack(nackHeader, *face1, pit2));
   BOOST_REQUIRE_EQUAL(face1->sentNacks.size(), 1);
-  BOOST_CHECK_EQUAL(face1->sentNacks.back().getReason(), lp::NackReason::CONGESTION);
-  BOOST_CHECK_EQUAL(face1->sentNacks.back().getInterest().getNonce(), 152);
+  BOOST_CHECK_EQUAL(face1->sentNacks[0].getReason(), lp::NackReason::CONGESTION);
+  BOOST_CHECK_EQUAL(face1->sentNacks[0].getInterest().getNonce(), 152);
   BOOST_CHECK_EQUAL(face2->sentNacks.size(), 0);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 1);
 
   // in-record is erased
   auto inRecord2a = pit2->getInRecord(*face1);
@@ -579,8 +664,9 @@
   BOOST_CHECK(forwarder.onOutgoingNack(nackHeader, *face2, pit2));
   BOOST_CHECK_EQUAL(face1->sentNacks.size(), 1);
   BOOST_REQUIRE_EQUAL(face2->sentNacks.size(), 1);
-  BOOST_CHECK_EQUAL(face2->sentNacks.back().getReason(), lp::NackReason::CONGESTION);
-  BOOST_CHECK_EQUAL(face2->sentNacks.back().getInterest().getNonce(), 808);
+  BOOST_CHECK_EQUAL(face2->sentNacks[0].getReason(), lp::NackReason::CONGESTION);
+  BOOST_CHECK_EQUAL(face2->sentNacks[0].getInterest().getNonce(), 808);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 2);
 
   // in-record is erased
   auto inRecord2b = pit2->getInRecord(*face2);
@@ -593,6 +679,7 @@
   face3->sentNacks.clear();
   BOOST_CHECK(!forwarder.onOutgoingNack(nackHeader, *face3, pit2));
   BOOST_CHECK_EQUAL(face3->sentNacks.size(), 0);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 2);
 
   // don't send Nack to face with invalid ID
   auto interest1b = makeInterest("/fM5IVEtC", false, std::nullopt, 553);
@@ -601,6 +688,7 @@
   face4->sentNacks.clear();
   BOOST_CHECK(!forwarder.onOutgoingNack(nackHeader, *face4, pit1));
   BOOST_CHECK_EQUAL(face4->sentNacks.size(), 0);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 2);
 }
 
 BOOST_AUTO_TEST_CASE(InterestLoopNack)
@@ -622,32 +710,52 @@
   auto interest1a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, std::nullopt, 732);
   face1->receiveInterest(*interest1a);
   BOOST_CHECK(face1->sentNacks.empty());
+  BOOST_CHECK_EQUAL(counters.nInInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nInNacks, 0);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 0);
 
   // receive Interest with duplicate Nonce on face1: legit retransmission
   face1->sentNacks.clear();
   auto interest1b = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, std::nullopt, 732);
   face1->receiveInterest(*interest1b);
   BOOST_CHECK(face1->sentNacks.empty());
+  BOOST_CHECK_EQUAL(counters.nInInterests, 2);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nInNacks, 0);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 0);
 
   // receive Interest with duplicate Nonce on face2
   face2->sentNacks.clear();
   auto interest2a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, std::nullopt, 732);
   face2->receiveInterest(*interest2a);
   BOOST_REQUIRE_EQUAL(face2->sentNacks.size(), 1);
-  BOOST_CHECK_EQUAL(face2->sentNacks.back().getInterest().wireEncode(), interest2a->wireEncode());
-  BOOST_CHECK_EQUAL(face2->sentNacks.back().getReason(), lp::NackReason::DUPLICATE);
+  BOOST_CHECK_EQUAL(face2->sentNacks[0].getInterest().wireEncode(), interest2a->wireEncode());
+  BOOST_CHECK_EQUAL(face2->sentNacks[0].getReason(), lp::NackReason::DUPLICATE);
+  BOOST_CHECK_EQUAL(counters.nInInterests, 3);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nInNacks, 0);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 1);
 
   // receive Interest with new Nonce on face2
   face2->sentNacks.clear();
   auto interest2b = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, std::nullopt, 944);
   face2->receiveInterest(*interest2b);
   BOOST_CHECK(face2->sentNacks.empty());
+  BOOST_CHECK_EQUAL(counters.nInInterests, 4);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nInNacks, 0);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 1);
 
   // receive Interest with duplicate Nonce on face3, don't send Nack to multi-access face
   face3->sentNacks.clear();
   auto interest3a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, std::nullopt, 732);
   face3->receiveInterest(*interest3a);
   BOOST_CHECK(face3->sentNacks.empty());
+  BOOST_CHECK_EQUAL(counters.nInInterests, 5);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nInNacks, 0);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 1);
 }
 
 BOOST_AUTO_TEST_CASE(InterestLoopWithShortLifetime) // Bug 1953
@@ -671,16 +779,20 @@
   auto interest = makeInterest("/A/1", false, 50_ms, 82101183);
   face1->receiveInterest(*interest);
 
-  // interest should be forwarded only once, as long as Nonce is in Dead Nonce List
+  // Interest should be forwarded only once, as long as Nonce is in Dead Nonce List
   BOOST_ASSERT(25_ms * 40 < forwarder.getDeadNonceList().getLifetime());
   this->advanceClocks(25_ms, 40);
   BOOST_CHECK_EQUAL(face2->sentInterests.size(), 1);
+  BOOST_CHECK_EQUAL(counters.nInInterests, 2);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nInNacks, 0);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 1);
 
   // It's unnecessary to check that Interest with duplicate Nonce can be forwarded again
   // after it's gone from Dead Nonce List, because the entry lifetime of Dead Nonce List
-  // is an implementation decision. NDN protocol requires Name+Nonce to be unique,
-  // without specifying when Name+Nonce could repeat. Forwarder is permitted to suppress
-  // an Interest if its Name+Nonce has appeared any point in the past.
+  // is an implementation decision. The NDN protocol requires Name+Nonce to be unique,
+  // without specifying when Name+Nonce could repeat. Theoretically, a forwarder is allowed
+  // to suppress an Interest if its Name+Nonce has appeared at any point in the past.
 }
 
 BOOST_AUTO_TEST_CASE(PitLeak) // Bug 3484
@@ -694,8 +806,11 @@
   BOOST_CHECK_EQUAL(pit.size(), 0);
 
   forwarder.onIncomingInterest(*interest, FaceEndpoint(*face1));
-  this->advanceClocks(100_ms, 20_s);
+  // PIT entry is never created if a loop is detected by the Dead Nonce List
   BOOST_CHECK_EQUAL(pit.size(), 0);
+  BOOST_CHECK_EQUAL(counters.nInInterests, 1);
+  BOOST_CHECK_EQUAL(counters.nOutInterests, 0);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 1);
 }
 
 BOOST_AUTO_TEST_CASE(UnsolicitedData)
@@ -703,10 +818,16 @@
   auto face1 = addFace();
   auto data = makeData("/A");
 
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 0);
+  BOOST_CHECK_EQUAL(counters.nInData, 0);
+  BOOST_CHECK_EQUAL(counters.nOutData, 0);
+  BOOST_CHECK_EQUAL(counters.nUnsolicitedData, 0);
+
   forwarder.onIncomingData(*data, FaceEndpoint(*face1));
   this->advanceClocks(1_ms, 10_ms);
-  BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 1);
+  BOOST_CHECK_EQUAL(counters.nInData, 1);
+  BOOST_CHECK_EQUAL(counters.nOutData, 0);
+  BOOST_CHECK_EQUAL(counters.nOutNacks, 0);
+  BOOST_CHECK_EQUAL(counters.nUnsolicitedData, 1);
 }
 
 BOOST_AUTO_TEST_CASE(NewNextHop)
