L. Frank Baum wrote 14 Oz books in the original main series.
Baum began the series with The Wonderful Wizard of Oz in 1900, illustrated by W. W. Denslow. Its success led him to continue Dorothy’s adventures and expand the setting into a connected fantasy world featuring characters such as Ozma, the Scarecrow, the Tin Woodman, and Tik-Tok.
The fourteenth and final Baum Oz book was Glinda of Oz. Although Baum died in 1919, the book was published posthumously in 1920. The complete set therefore spans two decades, from 1900 through 1920, and includes titles such as Ozma of Oz, The Emerald City of Oz, and The Magic of Oz.
The number can be confusing because other writers continued the Oz series after Baum’s death, especially Ruth Plumly Thompson, and Baum also wrote related Oz stories, plays, and companion works. Those additional publications do not change the standard answer: Baum himself wrote 14 books in the canonical main Oz series.