affinity: do not mix cpu count with gpu one

and update the old var with active gpus if -d is set