In his book entitled al-Dhikra, Shaykh al-Shahid, may Allah have mercy upon him, says:
One of its famous types is the numerical Istikharah, which was, however, not famous in the past ages before the time of the great Sayyid of ‘Amil (i.e. southern Lebanon), Razi al-Din Muhammad ibn Muhammad al-Awi al-Husayni, the neighbor of the holy shrine of Imam ‘Ali (‘a) in the holy city of al-Najaf. May Allah have mercy upon him.
Just like all of his reports, I have reported this type of Istikharah from him according to the following chain of authority: A number of our mentors have reported on the authority of the grand and virtuous Shaykh Jamal al-Din ibn al-Mutahhar on the authority of his father, may Allah be pleased with both of them, on the authority of Sayyid Razi al-Din on the authority of the Patron of the Matter; Imam al-Mahdi (‘a) who said:
Surah al-Fatihah is repeated ten times, or at least three times, or at the least one time. Then Surah al-Qadr is repeated ten times and then this supplicatory prayer is repeated three times:
اَللّٰهُمَّ اِنّىْۤ اَسْتَخِيْرُكَ لِعِلْمِكَ بِعَاقِبَةِ الْاُمُوْرِ
O Allah, I pray You to guide me to the best, because You have full knowledge of the consequences of all affairs
وَ اَسْتَشِيْرُكَ لِحُسْنِ ظَنِّىْ بِكَ
and I seek Your advice, for I have a good idea about You
فِى الْمَاْمُوْلِ وَالْمَحْذُوْرِ
in whatever is hoped and whatever is feared.
اَللّٰهُمَّ اِنْ كَانَ الْاَمْرُ الْفُلَانِىْ مِمَّا قَدْنِيْطَتْ بِالْبَرَكَةِ اَعْجَازُهُ وَ بَوَادِيْهِ
O Allah, if this issue [ the issue may be mentioned] is one of those issues whose beginnings and ends are connected to blessings
وَ حُفَّتْ بِالْكَرَامَةِ اَيَّامُهُ وَ لَيَالِيْهِ
and whose days and nights are surrounded with honor,
فَخِرْلِىْ اَللّٰهُمَّ فِيْهِ خِيَرَةً
then, O Allah, (please) choose for me an option
تَرُدُّ شُمُوْسَهُ ذَلُوْلًا
that makes its stubborn riding to be tractable for me
وَ تَقْعَضُ اَيَّامَهُ سُرُوْرًا
and cause its days to be leaned towards me with pleasure.
اَللّٰهُمَّ اِمَّا اَمْرٌ فَائْتَمِرْ
O Allah, make it either an order so that I will carry it out
وَ اِمَّا نَهْىٌ فَاَنْتَهِىْ
or warning so that I will stop doing it.
اَللّٰهُمَّ اِنِّىْۤ اَسْتَخِيْرُكَ بِرَحْمَتِكَ
O Allah, I pray You to guide me to the best choice out of Your mercy;
خِيَرَةً فِىْ عَافِيَةٍ
a choice that brings about wellbeing.
Then, a portion of the rosary is held with the hand while the issue for which the Istikharah has been done is kept hidden in the mind. If the number of the beads in the portion held by the hand comes to be even, this will be a sign to do what has been intended to do. If conversely the number of the beads comes to be odd, this will be a sign not to do what has been intended to do, or the opposite, according to the way already decided by the doer of the Istikharah (i.e. he, before entering into this Istikharah, must first of all decide that the even number will be considered order to do and the odd will be considered warning against it, or the opposite).
In a previous section of this book; namely, Some Highly Recommended Prayers, I have referred to the Prayer of Istikharah with Sheets, other types of Istikharah, and the best times of it