Psy in New York in 2012 (John Carucci/AP)

“Gangnam Style,” the K-pop sensation that basically owned 2012, has been viewed so many millions of times that, two years later, YouTube’s view counter literally broke trying to tally it.

The site is upgrading that tool as a result, a spokesperson wrote on YouTube’s Google+ page. That means that in the future, YouTube will be able to accommodate videos with more than 2.147 billion views — which was, previously, the most views YouTube imagined a video could ever receive.

But that seems kind of weird and arbitrary, right? There are more than 7 billion people on the planet, and only 40 percent of them currently use the Internet, and more are signing on every day — YouTube’s view potential seems, if not limitless, at least very large. Why even set a view count ceiling? Why does this thing exist?

The short answer: MATH. (And if you never envisioned a world where “Gangnam Style” could teach you something on that subject, allow me to remind you that this is the Internet.)

We tend to think of numbers as infinite things — which of course, they are. In grade school, when you made number lines, you probably put 0 in the middle and stretched numbers going to infinity on the right and left.

That’s theoretical, though. In practice, “infinity” is kind of an unmanageable concept, even for computers — they don’t have infinite memory, after all. So, when we talk about how high computers can count, we don’t talk about “infinity on either side.” Instead, we talk about how many numbers registries can store, based on how it codes and displays them.

This is sort of complicated, so we won’t get into it too deep. But basically, YouTube codes its view count as a signed 32-bit integer, which means (a) it stores numbers as a string of 32 0s and 1s, with one of those slots reserved for determining if it’s a positive or negative number, (b) it can only count up to 2^(32-1), or 2,147,483,648, and (c) if it reaches that point, instead of counting to the next positive number, it will switch into negative integers. In terms of YouTube’s display, that would probably mean showing a view count of -2,147,483,647, which of course makes no sense.

This is, incidentally, a pretty big problem — and not just for YouTube.

A lot of data is stored or calculated as a signed 32-bit integer, which means a lot of things “max out” at 2,147,483,647. There are a number of video games, for instance, that calculate things this way. More pressingly, the IP system that’s been used since the 1980s only allows for 2^32 IP addresses, or roughly 4.3 billion — a number we’re closing in on, particularly as everything from our cars to coffee machines connect to the “Internet of things.” (This has, as you might guess, prompted a move to a new system.)

A lot of computer systems also store the date as a signed 32-bit integer, with each new tick to the right in the number line representing a second since Jan. 1, 1970. On Jan. 19, 2038 at 3:14:08 UTC, that second count will hit 2,147,483,647 — which means the date will reset. To 1901. (This is called the “Year 2038 Problem,” and its pretty analogous to Y2K.)

An illustration of the “Year 2038 problem.” Watch for when that bottom date hits 03:13:08. (Wikipedia)

In all of these cases, of course, the engineers who designed these systems have been limited by the storage and the systems they’re working with. But YouTube intimates that there’s something else going on here, as well: a failure to even imagine a use for numbers so big. (“We never thought a video would be watched in numbers greater than a 32-bit integer … but that was before we met PSY,” the company said. )

Funnily enough, that’s not a new problem. In fact, it’s been the curse of 2,147,483,647 almost since the number was proven by Leonhard Euler in 1772.

“[It] is the greatest perfect number known at present, and probably the greatest that ever will be discovered,” the mathematician Peter Barlow wrote in 1811, “for as they are merely curious, without being useful, it is not likely that any person will attempt to find one beyond it.”

He was proved wrong in 1876, and again in 1883. Which perhaps goes to show that — where human curiosity is concerned, at least! — we may not want to set upward limits.

Many, many thanks to Brad Gould for fact-checking all things math in this post.