How many? Gene Roddenberry really seemed to love using them.
They're a frequent trope of the series, much like Kirk battling supercomputers, but it would be a mistake to ascribe every appearance of a God-like being to Gene Roddenberry.
"Who Mourns for Adonais?" was penned by Gilbert Ralston.
"Errand of Mercy" and "Arena" were penned by Gene Coon.
"The Squire of Gothos" was penned by Paul Schneider.
"Where No One Has Gone Before" was penned by Samuel A. Peeples.
"Day of the Dove" was penned by Jerome Bixby.
That's probably not a comprehensive list of episodes featuring God-like beings on the series, but not a single episode on it was penned by Roddenberry (though he did do re-writes of varying degrees on some of them, the premise of a God-like being originated with the credited writer in each case).