I am leaving for Umrah soon, but due to the uncleanliness of barbers in Mecca, I am wondering if I am able to shave my head beforehand and still have it count?
It's better you don't cut your scalp hair in such a manner that sufficient hair is not available for cutting/shaving, crop cut look is better to be avoided before embarking. Cutting of scalp hair or shaving is a pillar of umrah and hajj. It needs to be acted upon.
“having your heads shaved(hair cut alternatively)” [al-Fath 48:27].
Secondly shaving is not compulsory it's recommended, you can cut your hair equally using a personal electric trimmer.
The reward for shaving is thrice when compared to cutting while doing pilgrimage. Lesser(umrah) or major (hajj).
the Messenger of Allaah (peace and blessings of Allaah be upon him) shaved his entire head, and he prayed for those who shaved their heads three times, and for those who cut their hair once.
al-Mawsoo’ah al-Fiqhiyyah (18/98).
For fear of unclean barbers, Rely on Allah , recite remembrances of morning and evening to protect oneself. If you are going to avail their paid services.
PS: Hajj e tamattu is kind of hajj where you perform umrah on arrival in mecca and remove ihram and reenter it just before hajj. Many scholars will recommend hajj tamattu for an individual if one has sufficient finances instead of random umrah.