code: def influx_count_(self, measurement):
          
          try:
              q = "select count(*) from " + measurement
              self.start("Querying: count ...")
              datalen = self.influx_cli.query(q)
              self.end("Finished querying")
              numrows = int(datalen[measurement][datalen[measurement].keys()[0]])
              return numrows
          except Exception as e:
              self.err(e, self.influx_count_,
                       "Can not count rows for measurement")
docs: Count the number of rows for a measurement