code: def count(self, eventRegistry):
          
          self.setRequestedResult(RequestEventsInfo())
          res = eventRegistry.execQuery(self)
          if "error" in res:
              print(res["error"])
          count = res.get("events", {}).get("totalResults", 0)
          return count
docs: return the number of events that match the criteria