code: def count_markers_samples(prefix, file_type):
      
      # The files that will need counting
      sample_file = None
      marker_file = None
  
      if file_type == "bfile":
          # Binary files (.bed, .bim and .fam)
          sample_file = prefix + ".fam"
          marker_file = prefix + ".bim"
  
      elif file_type == "file":
          # Pedfile (.ped and .map)
          sample_file = prefix + ".ped"
          marker_file = prefix + ".map"
  
      elif file_type == "tfile":
          # Transposed pedfile (.tped and .tfam)
          sample_file = prefix + ".tfam"
          marker_file = prefix + ".tped"
  
      # Counting (this may take some time)
      nb_samples = 0
      with open(sample_file, "r") as f:
          for line in f:
              nb_samples += 1
  
      nb_markers = 0
      with open(marker_file, "r") as f:
          for line in f:
              nb_markers += 1
  
      return nb_markers, nb_samples
docs: Counts the number of markers and samples in plink file.
  
      :param prefix: the prefix of the files.
      :param file_type: the file type.
  
      :type prefix: str
      :type file_type: str
  
      :returns: the number of markers and samples (in a tuple).