We look at the division of 504974 by 5 
The aim is to understand the frequency of 5 in 504974.

Moving on to step 1:
5 can be fit into 5 1 times, resulting in a remainder of 0.
Write down 1 as next digit of the result. 
Result so far: 1.0
Subtracting 5 from 5 leaves us with 0.
Append the next digit (0) from the dividend to 0 and continue with: 0 / 5

Advancing to step 2:
When dividing 0 by 5, we get 0 with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 10.0
If we take 0 away from 0, we end up with 0.
Bring next digit (4) of the dividend behind the 0 and repeat the process: 4 / 5

Advancing to step 3:
5 goes into 4 0 times with a remainder of 4.
Write down 0 as next digit of the result. 
Result so far: 100.0
Subtracting 0 from 4 leaves us with 4.
Grab the next digit (9) from the dividend, add it to 4, then carry on: 49 / 5

Let's proceed to step 4:
When dividing 49 by 5, we get 9 with a remainder of 4.
The next digit of our result is 9. 
Result so far: 1009.0
Subtract 45 from 49 to get 4.
Append the next digit (7) from the dividend to 4 and continue with: 47 / 5

Let's proceed to step 5:
If we divide 47 by 5, we get 9 and a remainder of 2.
Use 9 as the next digit of our solution. 
Result so far: 10099.0
Deduct 45 from 47 and we're left with 2.
Append the next digit (4) from the dividend to 2 and continue with: 24 / 5

Moving on to step 6:
When dividing 24 by 5, we get 4 with a remainder of 4.
Write down 4 as next digit of the result. 
Result so far: 100994.0
Deduct 20 from 24 and we're left with 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Step 7:
The number 5 fits into 40 8 times, leaving a remainder of 0.
Put 8 as the next digit of the answer. 
Result so far: 100994.8
If we take 40 away from 40, we end up with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Moving on to step 8:
If we divide 0 by 5, we get 0 and a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 100994.8
Deduct 0 from 0 and we're left with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Going ahead to step 9:
5 goes into 0 0 times with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 100994.8
The remainder is 0 after subtracting 0 from 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Our division results in 100994.8 with a remaining 0.0.