code: def total_reads_from_grabix(in_file):
      
      gbi_file = _get_grabix_index(in_file)
      if gbi_file:
          with open(gbi_file) as in_handle:
              next(in_handle)  # throw away
              num_lines = int(next(in_handle).strip())
          assert num_lines % 4 == 0, "Expected lines to be multiple of 4"
          return num_lines // 4
      else:
          return 0
docs: Retrieve total reads in a fastq file from grabix index.