If you're talking about ext4 filesystems, it's based on the size of the filesystem. Defaults to 1 inode per 16,384 bytes. More information at Archwiki - ext4 - bytes per inode ratio
Note that this ratio can be revised at the time of filesystem creation, see man page for mkfs.ext4
To address the subsequent edits to the question, where you added some questions:
Where does that 983040 come from?
It comes from the filesystem size. 1 inode per 16,384 bytes of filesystem, by default.
Can we increase/decrease it?
Yes, but not easily. Backup the filesystem, recreate the filesystem using the "-i bytes-per-inode" argument in the man page. Restore the filesystem contents.
Within what limits?
As shown in the man page, bytes-per-inode should not be set to less than the block size, otherwise you're likely to have more inodes than could ever possibly be used. As Stéphane Chazelas points out, empty files, devices, fifos, sockets, short symlinks consume an inode, but don't consume a block.
Do you really need to create more than 887,357 further files in the root filesystem ?