fix math.countSigFigs

It didn't match negative numbers, so failed silently.

fixes #300