Looks correct parallelized.
The only thing you should add is a term specifying the use of A. You rely that the default case is shared. You should explicitly name the status with
#pragma omp parallel for reduction(+:num) default(shared)
or
#pragma omp parallel for reduction(+:num) shared(A)
also you do not need to write a semicolon (;) at the end of the pragma
line (but writing it would be no error)