The CSV Import Tool checks what records are currently in the system to identify potential duplicates. Because of that duplicate detection, the existing records in the system are counted toward the 20,000 record limit. For that reason, you might have fewer than 20,000 records in your file, but you may still get a record limit error when importing a CSV file.
To work around this, we recommend splitting the CSV file into multiple parts. The exact number will depend on how many records are in the file and how many records are in the system. To note, when splitting the file, it’s best to divide it up by username, so that the same user doesn’t appear in multiple files. That way, when our CSV import tool it looking for duplicates, it's only looking at the records for a subset of users.