Rob,
Thanks again for replying. As I promised I provided code to create test table and one of my working routines so far (in reply to myself). Honestly before I even didn't try 'count' but this time tested it too.
FYI here are some test results (might not be exact but gives idea) - Athlon 650Mhz, 192 Mb:
Routine provided : 26-27 secs
With count implementation (also tried 'count while' instead of 'count for' ) :
Didn't complete over half an hour and after shutting down via taskbar tested with 10 times smaller test table. Completed over 12 mins.
Trying a few other routines that use array processing and FLL bit masking. They sound to be faster but no complete prototype for them yet.
Still in need of streoids :)
Best regards
Cetin