Struggling with GenStage

As I’m (again) struggling with GenStage, can somebody explain to me the following lines in GenStage example RateLimiter?

producers = Map.update!(producers, from, fn {pending, interval} ->
  {pending + length(events), interval}
end)

Why does the rate-limiter increase the pending events when receiving events from upstream?