The 'gsmctl --sms --total' shows how many messages can be stored on your SIM card. According to the output of your command, your SIM card can store up to 20 SMS messages.
If you connect to your device via WebUI and navigate to Services -> Mobile Utilities -> Messages -> Storage tab, you will see that by default, the system tries to leave enough storage space for 5 messages. This means that some of the messages are deleted to ensure that the SIM card has enough space for at least 5 messages. You can reduce the number to 1, so that you would be able to store more messages. As an alternative, you can change the configuration on the same page to save messages to modem storage. If you set it to modem storage, you will be able to store way more messages than on your SIM card. If you make the change and refresh the page, you will see how many messages are currently in the modem storage and how many can be stored.