fix bug in count factorization

at least for count<INT_MAX, there was an obvious bug wherein a=1 b=count
was found first as a trivial solution.

now we count down from ceiling(sqrt(count)), which is at least the right
answer for count<INT_MAX.  the more interesting case has not been
verified yet.

in any case, we should really use a proper i.e. algorithmicly efficient
integer factorization code.