table.php: show count of entries
diff --git a/src/CancellationsRepository.php b/src/CancellationsRepository.php
index 5da586b..59a0a06 100644
--- a/src/CancellationsRepository.php
+++ b/src/CancellationsRepository.php
@@ -7,6 +7,9 @@
 use BaclucC5Crud\Entity\Repository;
 use Doctrine\ORM\EntityManager;
 use Doctrine\ORM\EntityManagerInterface;
+use Doctrine\ORM\NonUniqueResultException;
+use Doctrine\ORM\NoResultException;
+use RuntimeException;
 
 class CancellationsRepository implements Repository
 {
@@ -68,6 +71,23 @@
         return $query->getResult();
     }
 
+    public function countCancellationsOfEvent(int $eventId)
+    {
+        $qb = $this->entityManager->createQueryBuilder();
+        $qb->select('count(cancellation)')
+           ->from(EventCancellation::class, "cancellation")
+           ->join("cancellation.event", "event")
+           ->where($qb->expr()->eq("event.id", ":eventId"))
+           ->orderBy('cancellation.name')
+           ->setParameter("eventId", $eventId);
+        $query = $qb->getQuery();
+        try {
+            return $query->getSingleScalarResult();
+        } catch (NoResultException | NonUniqueResultException $e) {
+            throw new RuntimeException("Error getting count of result " . $e->getMessage());
+        }
+    }
+
     public function count()
     {
         $this->standardRepository->count();
diff --git a/src/EventCancellationsTableEntrySupplier.php b/src/EventCancellationsTableEntrySupplier.php
index 5e1b923..7870614 100644
--- a/src/EventCancellationsTableEntrySupplier.php
+++ b/src/EventCancellationsTableEntrySupplier.php
@@ -28,4 +28,9 @@
     {
         return $this->cancellationsRepository->getCancellationsOfEvent($this->eventId);
     }
+
+    public function count()
+    {
+        return $this->cancellationsRepository->countCancellationsOfEvent($this->eventId);
+    }
 }
\ No newline at end of file
diff --git a/src/NextEvent/ShowNextEventEntrySupplier.php b/src/NextEvent/ShowNextEventEntrySupplier.php
index 6dd908d..b4ffce5 100644
--- a/src/NextEvent/ShowNextEventEntrySupplier.php
+++ b/src/NextEvent/ShowNextEventEntrySupplier.php
@@ -37,4 +37,9 @@
             })
             ->toArray());
     }
+
+    public function count()
+    {
+        return 1;
+    }
 }
\ No newline at end of file
diff --git a/src/ShowCancellations.php b/src/ShowCancellations.php
index 02f2db0..9adc66f 100644
--- a/src/ShowCancellations.php
+++ b/src/ShowCancellations.php
@@ -83,6 +83,7 @@
         $this->variableSetter->set("actions",
             [$this->viewActionRegistry->getByName(ActionRegistryFactory::BACK_TO_MAIN)]);
         $this->variableSetter->set("rowactions", []);
+        $this->variableSetter->set("count", $tableView->getCount());
         $this->renderer->render(self::TABLE_VIEW);
     }