in reply to Re^2: Odometer pattern iterator (in C). (Updated.)
in thread Odometer pattern iterator (in C). (Updated.)

Yes, right, I made a mistake when removing the printing out of the solutions and just counting the solutions. The result is now:
$ time perl N_among_M.pl 184756 real 0m0.560s user 0m0.545s sys 0m0.015s