It is actually 6.022*1023
It is determined experimentally by taking a known quantity of some substance
For instance, in the experiment, a known quantity of certain chemical HCl, for example, is put into a beaker in which a cathode and anode are also taken.
Then the current is passed with the help of an external battery, and H+ and Cl- ions deposit on the cathode and anode respectively and then the quantity of current is accurately measured and the amount of deposits are also accurately measured.
The amount of charge can be found by taking the amount of current and multiplying it by the time taken for that deposit.
This measurement gives the amount of charge (x coulomb, suppose) required to deposit a certain amount (y mole, suppose) of H+.
So, you will get the charge carried by a certain amount of H+.(y moles carry x coulomb charge)
So you can get the charge carried by a unit amount of H+. (1 mole carries x/y coulomb charge)
And one H+ ion carries a charge of 1.6 * 10^(-19) C.
then you can calculate the amount of H+ required to have x/y amount of charge.
let N be the number of H+ required.
Then the amount of H+ required is 1.6*10^(-19) * N * 1(mole) = x/y
from here you can get the number of N which will come out to be 6.022*1023.