diff --git a/src/hello-protocol.cpp b/src/hello-protocol.cpp
index 4a995de..2e17e16 100644
--- a/src/hello-protocol.cpp
+++ b/src/hello-protocol.cpp
@@ -19,9 +19,9 @@
  *
  **/
 
+#include "hello-protocol.hpp"
 #include "nlsr.hpp"
 #include "lsdb.hpp"
-#include "hello-protocol.hpp"
 #include "utility/name-helper.hpp"
 #include "logger.hpp"
 
@@ -47,6 +47,9 @@
                                                  this, _1),
                                        std::bind(&HelloProtocol::processInterestTimedOut,
                                                  this, _1));
+
+  // increment SENT_HELLO_INTEREST
+  hpIncrementSignal(Statistics::PacketType::SENT_HELLO_INTEREST);
 }
 
 void
@@ -85,12 +88,17 @@
 {
   // interest name: /<neighbor>/NLSR/INFO/<router>
   const ndn::Name interestName = interest.getName();
+
+  // increment RCV_HELLO_INTEREST
+  hpIncrementSignal(Statistics::PacketType::RCV_HELLO_INTEREST);
+
   _LOG_DEBUG("Interest Received for Name: " << interestName);
   if (interestName.get(-2).toUri() != INFO_COMPONENT) {
     _LOG_DEBUG("INFO_COMPONENT not found or interestName: " << interestName
                << " does not match expression");
     return;
   }
+
   ndn::Name neighbor;
   neighbor.wireDecode(interestName.get(-1).blockFromValue());
   _LOG_DEBUG("Neighbor: " << neighbor);
@@ -103,6 +111,8 @@
     m_nlsr.getKeyChain().sign(*data, m_nlsr.getDefaultCertName());
     _LOG_DEBUG("Sending out data for name: " << interest.getName());
     m_nlsr.getNlsrFace().put(*data);
+    // increment SENT_HELLO_DATA
+    hpIncrementSignal(Statistics::PacketType::SENT_HELLO_DATA);
 
     auto adjacent = m_nlsr.getAdjacencyList().findAdjacent(neighbor);
     // If this neighbor was previously inactive, send our own hello interest, too
@@ -209,6 +219,8 @@
       }
     }
   }
+  // increment RCV_HELLO_DATA
+  hpIncrementSignal(Statistics::PacketType::RCV_HELLO_DATA);
 }
 
   // Simply logs a debug message that the content could not be
diff --git a/src/hello-protocol.hpp b/src/hello-protocol.hpp
index 808b843..dbc12d0 100644
--- a/src/hello-protocol.hpp
+++ b/src/hello-protocol.hpp
@@ -22,8 +22,10 @@
 #ifndef NLSR_HELLO_PROTOCOL_HPP
 #define NLSR_HELLO_PROTOCOL_HPP
 
+#include "statistics.hpp"
 #include "test-access-control.hpp"
 
+#include <ndn-cxx/util/signal.hpp>
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/mgmt/nfd/control-parameters.hpp>
 #include <ndn-cxx/mgmt/nfd/control-response.hpp>
@@ -93,6 +95,8 @@
   void
   processInterest(const ndn::Name& name, const ndn::Interest& interest);
 
+  ndn::util::signal::Signal<HelloProtocol, Statistics::PacketType> hpIncrementSignal;
+
 private:
   void
   processInterestTimedOut(const ndn::Interest& interest);
diff --git a/src/lsdb.cpp b/src/lsdb.cpp
index b71b48e..5cfc783 100644
--- a/src/lsdb.cpp
+++ b/src/lsdb.cpp
@@ -29,8 +29,6 @@
 #include <ndn-cxx/security/signing-helpers.hpp>
 #include <ndn-cxx/util/segment-fetcher.hpp>
 
-#include <string>
-
 namespace nlsr {
 
 INIT_LOGGER("Lsdb");
@@ -961,6 +959,9 @@
 Lsdb::expressInterest(const ndn::Name& interestName, uint32_t timeoutCount,
                       steady_clock::TimePoint deadline)
 {
+  // increment SENT_LSA_INTEREST
+  lsaIncrementSignal(Statistics::PacketType::SENT_LSA_INTEREST);
+
   if (deadline == DEFAULT_LSA_RETRIEVAL_DEADLINE) {
     deadline = steady_clock::now() + ndn::time::seconds(static_cast<int>(LSA_REFRESH_TIME_MAX));
   }
@@ -991,11 +992,28 @@
                                    std::bind(&Lsdb::afterFetchLsa, this, _1, interestName),
                                    std::bind(&Lsdb::onFetchLsaError, this, _1, _2, interestName,
                                              timeoutCount, deadline, lsaName, seqNo));
+  // increment a specific SENT_LSA_INTEREST
+  std::string typeLSA = interestName[-2].toUri();
+  if (typeLSA == AdjLsa::TYPE_STRING) {
+    lsaIncrementSignal(Statistics::PacketType::SENT_ADJ_LSA_INTEREST);
+  }
+  else if (typeLSA == CoordinateLsa::TYPE_STRING) {
+    lsaIncrementSignal(Statistics::PacketType::SENT_COORD_LSA_INTEREST);
+  }
+  else if (typeLSA == NameLsa::TYPE_STRING) {
+    lsaIncrementSignal(Statistics::PacketType::SENT_NAME_LSA_INTEREST);
+  }
+  else {
+    _LOG_ERROR("typeLSA " + typeLSA + " not recognized; failed Statistics::PacketType conversion");
+  }
 }
 
 void
 Lsdb::processInterest(const ndn::Name& name, const ndn::Interest& interest)
 {
+  // increment RCV_LSA_INTEREST
+  lsaIncrementSignal(Statistics::PacketType::RCV_LSA_INTEREST);
+
   const ndn::Name& interestName(interest.getName());
   _LOG_DEBUG("Interest received for LSA: " << interestName);
 
@@ -1014,7 +1032,6 @@
 
     std::string interestedLsType = interestName[-2].toUri();
 
-    // Passes the Interest off to the appropriate subprocessor
     if (interestedLsType == NameLsa::TYPE_STRING) {
       processInterestForNameLsa(interest, originRouter.append(interestedLsType), seqNo);
     }
@@ -1027,6 +1044,7 @@
     else {
       _LOG_WARN("Received unrecognized LSA type: " << interestedLsType);
     }
+    lsaIncrementSignal(Statistics::PacketType::SENT_LSA_DATA);
   }
 }
 
@@ -1056,13 +1074,16 @@
                                 const ndn::Name& lsaKey,
                                 uint64_t seqNo)
 {
-
+  // increment RCV_NAME_LSA_INTEREST
+  lsaIncrementSignal(Statistics::PacketType::RCV_NAME_LSA_INTEREST);
   _LOG_DEBUG("nameLsa interest " << interest << " received");
   NameLsa*  nameLsa = m_nlsr.getLsdb().findNameLsa(lsaKey);
   if (nameLsa != 0) {
     if (nameLsa->getLsSeqNo() == seqNo) {
       std::string content = nameLsa->getData();
       putLsaData(interest,content);
+      // increment SENT_NAME_LSA_DATA
+      lsaIncrementSignal(Statistics::PacketType::SENT_NAME_LSA_DATA);
     }
     else {
       _LOG_TRACE("SeqNo for nameLsa does not match");
@@ -1087,12 +1108,16 @@
     _LOG_ERROR("Received interest for an adjacency LSA when hyperbolic routing is enabled");
   }
 
+  // increment RCV_ADJ_LSA_INTEREST
+  lsaIncrementSignal(Statistics::PacketType::RCV_ADJ_LSA_INTEREST);
   _LOG_DEBUG("AdjLsa interest " << interest << " received");
   AdjLsa* adjLsa = m_nlsr.getLsdb().findAdjLsa(lsaKey);
   if (adjLsa != 0) {
     if (adjLsa->getLsSeqNo() == seqNo) {
       std::string content = adjLsa->getData();
       putLsaData(interest,content);
+      // increment SENT_ADJ_LSA_DATA
+      lsaIncrementSignal(Statistics::PacketType::SENT_ADJ_LSA_DATA);
     }
     else {
       _LOG_TRACE("SeqNo for AdjLsa does not match");
@@ -1117,12 +1142,16 @@
     _LOG_ERROR("Received Interest for a coordinate LSA when link-state routing is enabled");
   }
 
+  // increment RCV_COORD_LSA_INTEREST
+  lsaIncrementSignal(Statistics::PacketType::RCV_COORD_LSA_INTEREST);
   _LOG_DEBUG("CoordinateLsa interest " << interest << " received");
   CoordinateLsa* corLsa = m_nlsr.getLsdb().findCoordinateLsa(lsaKey);
   if (corLsa != 0) {
     if (corLsa->getLsSeqNo() == seqNo) {
       std::string content = corLsa->getData();
       putLsaData(interest,content);
+      // increment SENT_COORD_LSA_DATA
+      lsaIncrementSignal(Statistics::PacketType::SENT_COORD_LSA_DATA);
     }
     else {
       _LOG_TRACE("SeqNo for CoordinateLsa does not match");
@@ -1166,6 +1195,9 @@
     else {
       _LOG_WARN("Received unrecognized LSA Type: " << interestedLsType);
     }
+
+    // increment RCV_LSA_DATA
+    lsaIncrementSignal(Statistics::PacketType::RCV_LSA_DATA);
   }
 }
 
@@ -1173,6 +1205,8 @@
 Lsdb::processContentNameLsa(const ndn::Name& lsaKey,
                             uint64_t lsSeqNo, std::string& dataContent)
 {
+  // increment RCV_NAME_LSA_DATA
+  lsaIncrementSignal(Statistics::PacketType::RCV_NAME_LSA_DATA);
   if (isNameLsaNew(lsaKey, lsSeqNo)) {
     NameLsa nameLsa;
     if (nameLsa.initializeFromContent(dataContent)) {
@@ -1188,6 +1222,8 @@
 Lsdb::processContentAdjacencyLsa(const ndn::Name& lsaKey,
                                  uint64_t lsSeqNo, std::string& dataContent)
 {
+  // increment RCV_ADJ_LSA_DATA
+  lsaIncrementSignal(Statistics::PacketType::RCV_ADJ_LSA_DATA);
   if (isAdjLsaNew(lsaKey, lsSeqNo)) {
     AdjLsa adjLsa;
     if (adjLsa.initializeFromContent(dataContent)) {
@@ -1203,6 +1239,8 @@
 Lsdb::processContentCoordinateLsa(const ndn::Name& lsaKey,
                                   uint64_t lsSeqNo, std::string& dataContent)
 {
+  // increment RCV_COORD_LSA_DATA
+  lsaIncrementSignal(Statistics::PacketType::RCV_COORD_LSA_DATA);
   if (isCoordinateLsaNew(lsaKey, lsSeqNo)) {
     CoordinateLsa corLsa;
     if (corLsa.initializeFromContent(dataContent)) {
diff --git a/src/lsdb.hpp b/src/lsdb.hpp
index 2b182bd..bb0b9d8 100644
--- a/src/lsdb.hpp
+++ b/src/lsdb.hpp
@@ -27,6 +27,14 @@
 #include "sequencing-manager.hpp"
 #include "test-access-control.hpp"
 #include "communication/sync-logic-handler.hpp"
+#include "statistics.hpp"
+
+#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/util/signal.hpp>
+#include <ndn-cxx/util/time.hpp>
+
+#include <utility>
+#include <boost/cstdint.hpp>
 
 #include <utility>
 #include <boost/cstdint.hpp>
@@ -374,6 +382,8 @@
 public:
   static const ndn::Name::Component NAME_COMPONENT;
 
+  ndn::util::signal::Signal<Lsdb, Statistics::PacketType> lsaIncrementSignal;
+
 private:
   Nlsr& m_nlsr;
   ndn::Scheduler& m_scheduler;
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index 55d426a..70648e3 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -81,6 +81,7 @@
   , m_nfdRibCommandProcessor(m_localhostDispatcher,
                              m_namePrefixList,
                              m_nlsrLsdb)
+  , m_statsCollector(m_nlsrLsdb, m_helloProtocol)
   , m_faceMonitor(m_nlsrFace)
   , m_firstHelloInterval(FIRST_HELLO_INTERVAL_DEFAULT)
 {
diff --git a/src/nlsr.hpp b/src/nlsr.hpp
index 1a3432a..54af8b4 100644
--- a/src/nlsr.hpp
+++ b/src/nlsr.hpp
@@ -38,6 +38,7 @@
 #include "update/prefix-update-processor.hpp"
 #include "update/nfd-rib-command-processor.hpp"
 #include "utility/name-helper.hpp"
+#include "stats-collector.hpp"
 
 #include <stdexcept>
 
@@ -376,6 +377,11 @@
   canonizeNeighborUris(std::list<Adjacent>::iterator currentNeighbor,
                        std::function<void(std::list<Adjacent>::iterator)> then);
 
+  StatsCollector&
+  getStatsCollector()
+  {
+    return m_statsCollector;
+  }
 
 PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   void
@@ -470,6 +476,7 @@
   ndn::Name m_defaultCertName;
   update::PrefixUpdateProcessor m_prefixUpdateProcessor;
   update::NfdRibCommandProcessor m_nfdRibCommandProcessor;
+  StatsCollector m_statsCollector;
 
   ndn::nfd::FaceMonitor m_faceMonitor;
 
diff --git a/src/statistics.cpp b/src/statistics.cpp
new file mode 100644
index 0000000..f5f5516
--- /dev/null
+++ b/src/statistics.cpp
@@ -0,0 +1,101 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2017,  The University of Memphis,
+ *                           Regents of the University of California,
+ *                           Arizona Board of Regents.
+ *
+ * This file is part of NLSR (Named-data Link State Routing).
+ * See AUTHORS.md for complete list of NLSR authors and contributors.
+ *
+ * NLSR is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ **/
+
+#include "statistics.hpp"
+#include "nlsr.hpp"
+#include "utility/name-helper.hpp"
+
+namespace nlsr {
+
+size_t
+Statistics::get(PacketType type) const
+{
+  std::map<PacketType,int>::const_iterator it = m_packetCounter.find(type);
+  if(it != m_packetCounter.end())
+  {
+    return it->second;
+  }
+  else
+  {
+    return 0;
+  }
+}
+
+void
+Statistics::increment(PacketType type)
+{
+  m_packetCounter[type]++;
+}
+
+void
+Statistics::resetAll()
+{
+  for (auto&& it : m_packetCounter )
+  {
+    it.second = 0;
+  }
+}
+
+std::ostream&
+operator<<(std::ostream& os, const Statistics& stats)
+{
+  using PacketType = Statistics::PacketType;
+
+  os << "++++++++++++++++++++++++++++++++++++++++\n"
+     << "+                                      +\n"
+     << "+              Statistics              +\n"
+     << "+                                      +\n"
+     << "++++++++++++++++++++++++++++++++++++++++\n"
+     << "HELLO PROTOCOL\n"
+     << "    Sent Hello Interests: "              << stats.get(PacketType::SENT_HELLO_INTEREST) << "\n"
+     << "    Sent Hello Data: "                   << stats.get(PacketType::SENT_HELLO_DATA) << "\n"
+     << "\n"
+     << "    Received Hello Interests: "          << stats.get(PacketType::RCV_HELLO_INTEREST) << "\n"
+     << "    Received Hello Data: "               << stats.get(PacketType::RCV_HELLO_DATA) << "\n"
+     << "\n"
+     << "LSDB\n"
+     << "    Total Sent LSA Interests: "          << stats.get(PacketType::SENT_LSA_INTEREST) << "\n"
+     << "    Total Received LSA Interests: "      << stats.get(PacketType::RCV_LSA_INTEREST) << "\n"
+     << "\n"
+     << "    Total Sent LSA Data: "               << stats.get(PacketType::SENT_LSA_DATA) << "\n"
+     << "    Total Received LSA Data: "           << stats.get(PacketType::RCV_LSA_DATA) << "\n"
+     << "\n"
+     << "    Sent Adjacency LSA Interests: "      << stats.get(PacketType::SENT_ADJ_LSA_INTEREST) << "\n"
+     << "    Sent Coordinate LSA Interests: "     << stats.get(PacketType::SENT_COORD_LSA_INTEREST) << "\n"
+     << "    Sent Name LSA Interests: "           << stats.get(PacketType::SENT_NAME_LSA_INTEREST) << "\n"
+     << "\n"
+     << "    Received Adjacency LSA Interests: "  << stats.get(PacketType::RCV_ADJ_LSA_INTEREST) << "\n"
+     << "    Received Coordinate LSA Interests: " << stats.get(PacketType::RCV_COORD_LSA_INTEREST) << "\n"
+     << "    Received Name LSA Interests: "       << stats.get(PacketType::RCV_NAME_LSA_INTEREST) << "\n"
+     << "\n"
+     << "    Sent Adjacency LSA Data: "           << stats.get(PacketType::SENT_ADJ_LSA_DATA) << "\n"
+     << "    Sent Coordinate LSA Data: "          << stats.get(PacketType::SENT_COORD_LSA_DATA) << "\n"
+     << "    Sent Name LSA Data: "                << stats.get(PacketType::SENT_NAME_LSA_DATA) << "\n"
+     << "\n"
+     << "    Received Adjacency LSA Data: "       << stats.get(PacketType::RCV_ADJ_LSA_DATA) << "\n"
+     << "    Received Coordinate LSA Data: "      << stats.get(PacketType::RCV_COORD_LSA_DATA) << "\n"
+     << "    Received Name LSA Data: "            << stats.get(PacketType::RCV_NAME_LSA_DATA) << "\n"
+     << "++++++++++++++++++++++++++++++++++++++++\n";
+
+  return os;
+}
+
+} // namespace nlsr
diff --git a/src/statistics.hpp b/src/statistics.hpp
new file mode 100644
index 0000000..435938f
--- /dev/null
+++ b/src/statistics.hpp
@@ -0,0 +1,80 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2017,  The University of Memphis,
+ *                           Regents of the University of California,
+ *                           Arizona Board of Regents.
+ *
+ * This file is part of NLSR (Named-data Link State Routing).
+ * See AUTHORS.md for complete list of NLSR authors and contributors.
+ *
+ * NLSR is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ **/
+
+#ifndef NLSR_STATISTICS_HPP
+#define NLSR_STATISTICS_HPP
+
+#include <map>
+
+namespace nlsr {
+
+class Statistics
+{
+
+public:
+  enum class PacketType {
+    SENT_HELLO_INTEREST,
+    SENT_HELLO_DATA,
+    RCV_HELLO_INTEREST,
+    RCV_HELLO_DATA,
+    SENT_LSA_INTEREST,
+    SENT_ADJ_LSA_INTEREST,
+    SENT_COORD_LSA_INTEREST,
+    SENT_NAME_LSA_INTEREST,
+    SENT_LSA_DATA,
+    SENT_ADJ_LSA_DATA,
+    SENT_COORD_LSA_DATA,
+    SENT_NAME_LSA_DATA,
+    RCV_LSA_INTEREST,
+    RCV_ADJ_LSA_INTEREST,
+    RCV_COORD_LSA_INTEREST,
+    RCV_NAME_LSA_INTEREST,
+    RCV_LSA_DATA,
+    RCV_ADJ_LSA_DATA,
+    RCV_COORD_LSA_DATA,
+    RCV_NAME_LSA_DATA
+  };
+
+  size_t
+  get(PacketType) const;
+
+  void
+  resetAll();
+
+  void
+  increment(PacketType);
+
+  const std::map<PacketType,int>&
+  getCounter() const
+  {
+    return m_packetCounter;
+  }
+
+private:
+  std::map<PacketType,int> m_packetCounter;
+};
+
+std::ostream&
+operator<<(std::ostream&, const Statistics& stats);
+
+} // namespace nlsr
+
+#endif // NLSR_STATISTICS_HPP
diff --git a/src/stats-collector.cpp b/src/stats-collector.cpp
new file mode 100644
index 0000000..cb179ec
--- /dev/null
+++ b/src/stats-collector.cpp
@@ -0,0 +1,52 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2017,  The University of Memphis,
+ *                           Regents of the University of California
+ *
+ * This file is part of NLSR (Named-data Link State Routing).
+ * See AUTHORS.md for complete list of NLSR authors and contributors.
+ *
+ * NLSR is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ **/
+
+#include "stats-collector.hpp"
+#include "logger.hpp"
+#include <fstream>
+
+namespace nlsr {
+
+StatsCollector::StatsCollector(Lsdb& lsdb, HelloProtocol& hp)
+  : m_lsdb(lsdb)
+  , m_hp(hp)
+{
+  m_lsaIncrementConn =
+  this->m_lsdb.lsaIncrementSignal.connect(std::bind(&StatsCollector::statsIncrement,
+                                                    this, _1));
+
+  m_helloIncrementConn =
+  this->m_hp.hpIncrementSignal.connect(std::bind(&StatsCollector::statsIncrement,
+                                                 this, _1));
+}
+
+StatsCollector::~StatsCollector()
+{
+  m_lsaIncrementConn.disconnect();
+  m_helloIncrementConn.disconnect();
+}
+
+void
+StatsCollector::statsIncrement(Statistics::PacketType pType)
+{
+  m_stats.increment(pType);
+}
+
+} // namespace nlsr
diff --git a/src/stats-collector.hpp b/src/stats-collector.hpp
new file mode 100644
index 0000000..a2be959
--- /dev/null
+++ b/src/stats-collector.hpp
@@ -0,0 +1,72 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2017,  The University of Memphis,
+ *                           Regents of the University of California
+ *
+ * This file is part of NLSR (Named-data Link State Routing).
+ * See AUTHORS.md for complete list of NLSR authors and contributors.
+ *
+ * NLSR is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ **/
+
+#ifndef NLSR_STATS_COLLECTOR_HPP
+#define NLSR_STATS_COLLECTOR_HPP
+
+#include "statistics.hpp"
+#include "lsdb.hpp"
+#include "hello-protocol.hpp"
+#include <ndn-cxx/util/signal.hpp>
+
+namespace nlsr {
+
+// brief: a class designed to handle statistical signals in nlsr
+
+class StatsCollector
+{
+public:
+
+  StatsCollector(Lsdb& lsdb, HelloProtocol& hp);
+
+  ~StatsCollector();
+
+  Statistics&
+  getStatistics()
+  {
+    return m_stats;
+  }
+
+private:
+
+  /*!
+   * \brief: increments a Statistics::PacketType
+   *
+   * \param: pType is an enum value corresponding to a Statistics::PacketType
+   *
+   * This takes in a Statistics::PacketType emitted by a signal and increments
+   * the value in m_stats.
+   */
+  void
+  statsIncrement(Statistics::PacketType pType);
+
+private:
+
+  Lsdb& m_lsdb;
+  HelloProtocol& m_hp;
+  Statistics m_stats;
+
+  ndn::util::signal::ScopedConnection m_lsaIncrementConn;
+  ndn::util::signal::ScopedConnection m_helloIncrementConn;
+};
+
+} // namespace nlsr
+
+#endif // NLSR_STATS_COLLECTOR_HPP
