How many users we can register in a connection?

How many user I can register in a single connection? Not in external database I need a database with 40k users that a want to import, but not necessary this users will do the login.

As far as I’m aware there is no limit to the amount of users that can exist in a single connection. You need to take in consideration that you won’t be able to import the full 40k in one go; you can check the Management API endpoints for creating individual users and for importing users in bulk. In addition be sure to read the reference documentation on bulk importing users.