And the rules that they used to determine what is a vowel and what is a character/letter, and what are is the numerical value for each character/letter all came from the Glorious Quran Itself, in particular from Surat Nuh, where the Noble Surah determined all of that, and it has the Numerical Miracle of claiming that Prophet Nuh (Noah) lived among his people for 950 years, and the Noble Surah Itself was written in exactly 950 letters.
I have verified this claim by counting them myself and posting them on the site. Again, visit the link above.
Take care,
Osama Abdallah