Provide better solution to the numOfAttempts issue

Insures that the number of attempts defined in the environment is correct.
It is the sum of the number of incorrect attempts, the number of correct attempts
and the number of ungraded attempts (which is 1 or 0 depending upon whether an
answer has been submitted).
The calculation is done in PG.pm