def auto_bin_size(nevt):
    """
  Given the list of event size (counts), return appropriate num of bins,
  which is calculated from sqrt of smallest event size, rounded in 5.
  min of 20, max of 100.

  >>> auto_bin_size(100)
  20
  >>> auto_bin_size(5000)
  70
  >>> auto_bin_size(1E6)
  100
  >>> auto_bin_size(0)  # Even null plot, return minimum number of bins
  20

  """
    minv = 20
    maxv = 100
    val = int(round(1.0 / 5 * nevt ** 0.5) * 5)
    return minv if val < minv else maxv if val > maxv else val
