All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
If doubt occurs about the number of pebbles while throwing them at Jamarah, then one must act according to what he is certain of; i.e., the (lesser) number, and then he should throw the remaining number. If the doubt rises after completing the act of throwing the pebbles, then one should not care about it unless he strongly believes that he did not throw the required number. If he strongly believes that he failed to throw some of the required pebbles, then he should throw the missing pebbles if it is possible to do so in the same period. If it is not possible, then one should slaughter a sheep if the doubt is three or more pebbles. If the doubt is in one pebble, then he should give a Mudd (which is approximately 750 grams) of food, and two Mudds of food if he doubts two pebbles. This is the opinion of the Shaafi’i School of jurisprudence.
Allah knows best.