Most developers have seen this message before:

429 Too Many Requests

But what actually happens behind the scenes before a system decides to reject a request?

How are requests counted?

Where is that data stored?