Don't count your chickens before they hatch
In Yoruba Má ka àkókò kọ́ àwọn adìẹ rẹ kí wọ́n tó yọ.
This proverb is a direct equivalent, warning against counting on something before it's certain.
Example
"Ó ti ń ṣe ayẹyẹ, ṣùgbọ́n mo sọ pé, 'Má ka àkókò kọ́ àwọn adìẹ rẹ kí wọ́n tó yọ.'"