diff --git a/HRM_Processor.py b/HRM_Processor.py
index c4bdeda..a195f4f 100644
--- a/HRM_Processor.py
+++ b/HRM_Processor.py
@@ -38,6 +38,9 @@ class HRM_Processor:
             self.input_data["time"], self.input_data["voltage"])
         self.output_dict["start_times"] = beat_start_times
 
+        num_beats = self.determine_num_beats(beat_start_times)
+        self.output_dict["num_beats"] = num_beats
+
     def determine_voltage_extremes(self, voltage):
         """Determines the min and max values of the voltage data
 
@@ -225,3 +228,21 @@ class HRM_Processor:
 
         beat_start_times = time[qrs_peak_locations].flatten()
         return beat_start_times
+
+    def determine_num_beats(self, beat_start_times):
+        """Determines the number of beats that occurred based on the number
+        of elements in the beat_start_times array
+
+        Parameters
+        ----------
+        beat_start_times:   numpy array
+                            A numpy array containing the start times (time
+                            of the peak of each QRS complex) fo reach beat
+
+        Returns
+        -------
+        num_beats           int
+                            The number of beats
+        """
+        num_beats = np.size(beat_start_times)
+        return num_beats

The HRM_Processor needs to determine the BPM
The HRM_Processor should be able to write the mean BPM calculated either during a user specified duration or the default duration. 

Input: Array of beat start times, duration of interest as a tuple.
Output: mean BPM, rounded to the nearest int

Basic steps:
- Access the duration of interest
- Find the first index where the start times array exceeds the beginning of the start time of the duration of interest
- Find the index where the start time array exceeds the end time of the duration of interest
- Find the number of beats = the difference between those two indices
- Calculate the duration in seconds (= difference between them), convert to minutes
- BPM = number of beats / duration in minutes

** It may end up being best to split this into multiple functions. 

diff --git a/test_HRM_Processor.py b/test_HRM_Processor.py
index 951fb0f..7c46b58 100644
--- a/test_HRM_Processor.py
+++ b/test_HRM_Processor.py
@@ -203,3 +203,15 @@ def test_index_beat_start_times(hrm):
     measured_start_times = hrm.index_beat_start_times(time, qrs_peak_locations)
 
     assert np.array_equal(expected_start_times, measured_start_times)
+
+
+def test_determine_num_beats(hrm):
+    """Tests the most basic functionality of the determine_num_beats
+    function, which simply returns the length of the start_times array that
+    has been passed into it."""
+
+    start_times = np.array([1, 2, 3, 4])
+    expected_num_beats = 4
+    measured_num_beats = hrm.determine_num_beats(start_times)
+
+    assert expected_num_beats == measured_num_beats

pip install -r requirements.txt
parse_log_pytest
requirements.txt
pytest
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
coverage==7.8.0
exceptiongroup==1.2.2
execnet==2.1.1
iniconfig==2.1.0
numpy==2.0.2
packaging==24.2
pep8==1.7.1
pluggy==1.5.0
pytest==8.3.5
pytest-cache==1.0
pytest-cov==6.0.0
pytest-pep8==1.0.6
tomli==2.2.1

name: bme590hrm
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
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - coverage==7.8.0
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - iniconfig==2.1.0
      - numpy==2.0.2
      - packaging==24.2
      - pep8==1.7.1
      - pluggy==1.5.0
      - pytest==8.3.5
      - pytest-cache==1.0
      - pytest-cov==6.0.0
      - pytest-pep8==1.0.6
      - tomli==2.2.1
prefix: /opt/conda/envs/bme590hrm

test_HRM_Processor.py::test_determine_num_beats
test_HRM_Processor.py::test_find_qrs_peak_indices
test_HRM_Processor.py::test_HRM_Processor_init test_HRM_Processor.py::test_voltage_extremes test_HRM_Processor.py::test_write_outputs_to_dict_voltage_extremes test_HRM_Processor.py::test_determine_ecg_strip_duration test_HRM_Processor.py::test_write_strip_duration test_HRM_Processor.py::test_determine_threshold test_HRM_Processor.py::test_find_indices_above_threshold test_HRM_Processor.py::test_find_beat_separation_points test_HRM_Processor.py::test_index_beat_start_times
HRM_Processor.py
HRM_Processor.py