Vyxal s
, 5 bytes
ɾǐƛ5O # main program
ɾ # range over input
ǐ # take the prime factors of each number
ƛ5O # for each value, count the 5s
-s # sum top of stack
Vyxal, 3 bytes
¡5Ǒ
This one uses the same approach as caird coinheringaahing's answer
Vyxal l
, 3 bytes (for inputs > 4)
¡Ġt
Approach by Lyxal, takes the factorial of the input, groups by consecutive, then gets the length of the tail using the -l flag.