ESP32 AP max connections: 4 or 10?
The answer is as clear as any other EspressIf configuration data, it is 4 or maybe 5, or 8, or 12, 16 or even 20 (the same as a ESP8266!)

To clarify, it seems that around 2015 the maximum was 4 connections, but it is possible to recompile the SDK to support up to 16 connections.  There doesn't seem to be a #define of flag that will let a programmer control this.

These links may guide you to a proper solution:
https://github.com/esp8266/Arduino/issues/570
 or https://myesp8266.blogspot.com/2016/11/esp32-increase-maximum-number-of-sockets.html