Let's denote the number of books Mai read in June as x.
In July, she read half as many books as in June, so she read (1/2)x books.
In August, she read 2 more books than in June, so she read x + 2 books.
The total number of books she read in June, July, and August is x + (1/2)x + (x + 2) = 17.
Combining like terms, we get (2.5x + 2) / 2 = 17.
Multiplying both sides of the equation by 2, we get 2.5x + 2 = 34.
Subtracting 2 from both sides of the equation, we get 2.5x = 32.
Dividing both sides of the equation by 2.5, we get x = 32 / 2.5 = 12.8.
Since we cannot have a fraction of a book, we conclude that Mai read 12 books in June.
In August, she read x + 2 = 12 + 2 = 14 books. Answer: 14 books