diff --git a/isc_dhcp_filter/__init__.py b/isc_dhcp_filter/__init__.py
index d769b6d..70524c3 100644
--- a/isc_dhcp_filter/__init__.py
+++ b/isc_dhcp_filter/__init__.py
@@ -1,6 +1,6 @@
+from isc_dhcp_leases import IscDhcpLeases
 from isc_dhcp_leases import Lease
 from isc_dhcp_leases import Lease6
-from isc_dhcp_leases import IscDhcpLeases
 
 
 def parse(*files):
@@ -119,6 +119,13 @@ class Leases:
 
         return Leases(g)
 
+    def count(self):
+        """
+        Returns the count of leases in the current set of leases
+        :return: int count of leases
+        """
+        return len(self)
+
     def __iter__(self):
         """
         Returns an iterator for the current set of leases
@@ -128,3 +135,16 @@ class Leases:
             yield from iter(self._leases)
         elif self._iter:
             yield from self._iter()
+
+    def __len__(self):
+        """
+        Implements __len__
+        If we are dealing with a generator we will expand it into `_leases`
+        :return:
+        """
+        if type(self._leases) is list:
+            return len(self._leases)
+        else:
+            l = list(iter(self))
+            self._leases = l
+            return len(l)

Add `.count()` method as shortcut for len(list(leases))
Sometime the only intresting part about the lease db is how many are actually in a given state. Currently you've to write `len(list(leases.active))` to get the count of active leases. `leases.active.count()` and also implementing `__len__` would probably be handy.
diff --git a/tests/__init__.py b/tests/__init__.py
index e924baf..426d90b 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,11 +1,11 @@
 import os
 from unittest import TestCase
 
+from freezegun import freeze_time
 from isc_dhcp_leases import Lease
 from isc_dhcp_leases.iscdhcpleases import BaseLease
 
 from isc_dhcp_filter import parse, Leases
-from freezegun import freeze_time
 
 
 class LeaseLoaderMixin:
@@ -26,6 +26,15 @@ class BaseLeaseTester:
         self.assertEqual(len(active_valid), len(valid_active))
         self.assertEqual(len(active_valid), len(list(self.leases.current)))
 
+    def test_list_twice(self):
+        a = list(self.leases)
+        b = list(self.leases)
+
+        self.assertEqual(a, b)
+
+    def test_len(self):
+        self.assertEqual(len(self.leases), self.leases.count())
+
     def test_v4_filter(self):
         for lease in self.leases.v4:
             self.assertIsInstance(lease, Lease)
@@ -65,7 +74,7 @@ class BaseLeaseTester:
     def test_filter_combine(self):
         combined = Leases(self.leases.v4, self.leases.v6)
         l = len(list(combined))
-        self.assertEqual(l, len(list(self.leases)))
+        self.assertEqual(l, len(self.leases))
 
 
 class TestDhcpd6(LeaseLoaderMixin, BaseLeaseTester, TestCase):
@@ -74,18 +83,20 @@ class TestDhcpd6(LeaseLoaderMixin, BaseLeaseTester, TestCase):
     def test_dhcpv6_active(self):
         leases = self.leases
 
-        self.assertEqual(len(list(leases)), 4)
-        self.assertEqual(len(list(leases.active)), 4)
+        self.assertEqual(len(leases), 4)
+        self.assertEqual(len(leases.active), 4)
+        self.assertEqual(len(leases.active), 4)
 
     @freeze_time("2015-07-6 8:15:0")
     def test_dhcpv6_active_valid(self):
         leases = self.leases
 
-        active_valid = list(leases.active.valid)
-        valid_active = list(leases.valid.active)
+        active_valid = leases.active.valid
+        valid_active = leases.valid.active
 
         self.assertEqual(len(active_valid), len(valid_active))
-        self.assertEqual(len(active_valid), len(list(leases.current)))
+        self.assertEqual(len(active_valid), len(leases.current))
+        self.assertEqual(sorted(active_valid, key=id), sorted(valid_active, key=id))
 
     def test_dhcpv6_invalid(self):
         leases = self.leases
@@ -115,6 +126,11 @@ class TestDebian7(LeaseLoaderMixin, BaseLeaseTester, TestCase):
         leases2 = list(self.leases.where_eq('vendor-class-identifier', 'Some Vendor Identifier'))
         self.assertEqual(leases1, leases2)
 
+
 class TestEmptyLease(BaseLeaseTester, TestCase):
     def setUp(self):
-        self.leases = Leases()
\ No newline at end of file
+        self.leases = Leases()
+
+    def test_lease_count_zero(self):
+        self.assertEqual(self.leases.count(), 0)
+        self.assertEqual(len(self.leases), 0)

pip install -e .
parse_log_pytest
requirements.txt
pytest freezegun
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
exceptiongroup==1.2.2
freezegun==1.5.1
iniconfig==2.1.0
-e git+https://github.com/andir/isc-dhcp-filter.git@efc868102f47329f7280b87a21b5fd9e9defcd64#egg=isc_dhcp_filter
isc-dhcp-leases==0.10.0
packaging==24.2
pluggy==1.5.0
pytest==8.3.5
python-dateutil==2.9.0.post0
six==1.17.0
tomli==2.2.1

name: isc-dhcp-filter
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:
      - exceptiongroup==1.2.2
      - freezegun==1.5.1
      - iniconfig==2.1.0
      - isc-dhcp-leases==0.10.0
      - packaging==24.2
      - pluggy==1.5.0
      - pytest==8.3.5
      - python-dateutil==2.9.0.post0
      - six==1.17.0
      - tomli==2.2.1
prefix: /opt/conda/envs/isc-dhcp-filter

tests/__init__.py::TestDhcpd6::test_dhcpv6_active tests/__init__.py::TestDhcpd6::test_dhcpv6_active_valid tests/__init__.py::TestDhcpd6::test_filter_combine tests/__init__.py::TestDhcpd6::test_len tests/__init__.py::TestDebian7::test_filter_combine tests/__init__.py::TestDebian7::test_len tests/__init__.py::TestEmptyLease::test_filter_combine tests/__init__.py::TestEmptyLease::test_lease_count_zero tests/__init__.py::TestEmptyLease::test_len
tests/__init__.py::TestDhcpd6::test_active_filter tests/__init__.py::TestDhcpd6::test_active_valid_current tests/__init__.py::TestDhcpd6::test_current_filter tests/__init__.py::TestDhcpd6::test_dhcpv6_invalid tests/__init__.py::TestDhcpd6::test_filter_func tests/__init__.py::TestDhcpd6::test_inactive_filter tests/__init__.py::TestDhcpd6::test_invalid_filter tests/__init__.py::TestDhcpd6::test_list_twice tests/__init__.py::TestDhcpd6::test_v4_filter tests/__init__.py::TestDhcpd6::test_v6_filter tests/__init__.py::TestDhcpd6::test_valid_filter tests/__init__.py::TestDhcpd6::test_where_eq tests/__init__.py::TestDebian7::test_active_filter tests/__init__.py::TestDebian7::test_active_valid_current tests/__init__.py::TestDebian7::test_current_filter tests/__init__.py::TestDebian7::test_filter_func tests/__init__.py::TestDebian7::test_inactive_filter tests/__init__.py::TestDebian7::test_invalid_filter tests/__init__.py::TestDebian7::test_list_twice tests/__init__.py::TestDebian7::test_v4_filter tests/__init__.py::TestDebian7::test_v6_filter tests/__init__.py::TestDebian7::test_valid_filter tests/__init__.py::TestDebian7::test_vendor_class_identifier tests/__init__.py::TestEmptyLease::test_active_filter tests/__init__.py::TestEmptyLease::test_active_valid_current tests/__init__.py::TestEmptyLease::test_current_filter tests/__init__.py::TestEmptyLease::test_filter_func tests/__init__.py::TestEmptyLease::test_inactive_filter tests/__init__.py::TestEmptyLease::test_invalid_filter tests/__init__.py::TestEmptyLease::test_list_twice tests/__init__.py::TestEmptyLease::test_v4_filter tests/__init__.py::TestEmptyLease::test_v6_filter tests/__init__.py::TestEmptyLease::test_valid_filter
isc_dhcp_filter/__init__.py
isc_dhcp_filter/__init__.py