num_joysticks - Man Page
Global variable saying how many joysticks there are. Allegro game programming library.
Synopsis
#include <allegro.h>
extern int num_joysticks;
Description
Global variable containing the number of active joystick devices. The current drivers support a maximum of eight controllers.
See Also
Info
version 4.4.3 Allegro manual