The maximum size of TempDB, like all other databases, is ~525 000 TB, so that's the limit to how many rows you can put into a Temp Table. Probably a bit less, there's other stuff in TempDB as well.
Not limited by available memory because neither TempDB nor temp tables (nor table variables for that matter) are memory-only.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability