Damn it, your post really made me curious, so I did some testing and research and found out that:
In Factorio's version of Lua (LuaJIT), numbers are stored as 64-bit floating point numbers ("double" precision).
That means:
You can safely represent integers exactly up to about 9,007,199,254,740,992 (around 9 quadrillion — 9×10¹⁵).
After that, integers lose precision (they get fuzzy).
Lua exact integer storage:
Up to 9,007,199,254,740,992 (2⁵³): exact
After that: numbers still exist, but small changes (like +1) get lost
The network can count way past 2 billion without any issue.
It could even reach trillions without problems inside Lua.
The problem only happens if you need exact control over insanely high numbers past 9 quadrillion — but that's wildly outside any normal gameplay.
So good luck breaking that! :D