Old DInput.DLL used in games limit buttons usage in 32 + 4 POV HAT (more than 1 require game support) per controller.
Limit that still being used in the obsolete (Win 95 legacy) Games Controllers in Windows control panel.
But for test purpose software like
VKB Button Tester or similar software from VirPil see up to 128 buttons + 4 POV HAT,
as well the keymapper JoyToKey or Joystick Gremlin.
New DInput.DLL allow games use up to 128 buttons per controller (joystick, throttle...) examples
IL-2:GB (Bo'X) up to 64.
DCS World (and I think X-Plane) up to 128.