The number of religious people will never be zero. Religion is a method to control population by surrendering their free will. Over the very long term, religions do go extinct, or nearly-so. Look at Zoroastrianism, Norse paganism, Egyptian panopoly, the ancient Sumerian and Mesopotamian city-god cults.
They fall apart and lose adherents when their political backing collapses. In some cases, they get replaced by more wide-ranging systems, like how Chrisitanity displaced the older, more esoteric Norse religions. Norse mythology sort of makes sense in cold, forested, sparesly populated Scandinavia, but as those cultures learned more about the rest of the planet, the stories of trolls, giants, gods and monsters as an excuse for banditry and raiding starts to look silly when you see the wider world.
Convesion and Displacement, but generally because The Leader of these societies decided at some point through genuine faith, political convenience, their wife's faith or just pragmatic cynicism that it was a good idea to move in a different direction. Hence, religion is a matter of political, economic and moral control. That's never going to go completely out of style, as there's always going to be bastards who want to use superstition to control people.