How to count the number of digits of a floating number?

Thanks @Chrisir for your reply. I was looking for a method that doesnt use any string coversion, but Its ok.