The question pertains to the numeral system of base 5s
We will express the number of sheeps counted in the base 5, and determine the actual number of sheeps he counted by converting the base 5 system to decimal system as follows:
Base 5 sytem: 3 1 4 5
Decimal system: 3*5^3 1*5^2 4*5^1 5*5^0
We will compute each induvidual base number and sum up the results as follows:
Note: The power ( 5 ) always starts from 0 from least digit ( right most ) and increase till the most significant digit ( left most ).

Therefore, Kelvin actually counted:
