The Nintendo 64 got its name from its 64-bit central processing unit, a step up from the 16-bit Super Nintendo and the 8-bit NES before it. The number highlighted the leap in processing power at the time.
It also was not Nintendo's third console. The NES, SNES, a handheld line beginning with the Game Boy, and the short-lived Virtual Boy all preceded it, making the "64" a reference to technology rather than console order.