Too many files in a single folder

Hello,
I've a simple problem to describe, but it seems impossible to solve...

In practice an application wrote a lot of files inside a folder, probably even 1.000.000...
I said probably because there is no way to count them, infact "ls" seems not working in such cases.

I already wrote a script that, for the future, will move and zip all the files daily, avoiding this will happen again.

But I absolutely need the files in that directory... So I need a way to treat them as described above, that is to move in different folders all the files, distinguishing them by the day.

Being impossible to use the "ls", could be there some other hope with different command?

Thanks

sometimes when "ls" is not working anymore,

echo *

is doing the job, for count use

echo * | wc -w

files should not contain spaces

Thank you,
just finished to test and even

find . -type f|wc -l

did the job. Simply the

find . -type f

of course gave me all the files (what I really need to go on).

By the way, there are 2.555.251 in this folder :D:D