count the number of available graphics cards

Signed-off-by: Mattias Andrée <maandree@operamail.com>