There was indeed fighting in what is today Iran during WWI. It is hard to say exactly how many died in that fighting, most sources just list casualties for the Ottoman Empire as a whole, which is below 3 million, and that includes around half a million war dead and 1 to 1.5 million that died in the Armenian genocide. (sources)
But I can't find any sources on how many that dies in the Persian campaign, or how many Persians died.
However, the question seems to not actually or at least originally be about this. Instead it's a question about how many that does of a famine during the war.
The claims of a major famine in Persia comes from the book "The Great Famine and Genocide in Persia, 1917-1919". I can't find any references to a famine in Persia that doesn't trace back to that book.
In this book Mohammad Gholi Majd claims that the population of Iran in 1900 was 12 million, and in 1910 was 15 million. He then draws the conclusion that the population in 1920 therefore should have been 18-20 million by "natural progression", a conclusion that can not be made, and is contradicted by sources. But since the population in fact were 11 million, not 20, he claims that 8-10 million must have died from starvation.
Not only does this reasoning not hold up to scrutiny, there is nothing that says that the population should have increased to 20 million by "natural progression" in that way. In addition other sources contradict his population claims. All other sources agree that the population of what is now Iran was slightly below 10 million in 1900 and slightly above 10 million in 1910. (see Pieter Geerkens sources from comments: 1, 2, 3)
There does seem to have been a severe lack of food in 1917-1918. Lack of food is a common effect of war, and in this case it seems to have been compounded by drought. But it is quite clear that the gigantic famine with millions of dead in Iran that Majd writes about isn't something that really happened.