Another wrong assumption made is that a religious person worships the number of gods he believes it exists. That's untrue. There are plenty of monolatrist religions that are polytheistic, for instance. The most well-known example of this must be the Hebrews, that believed in several Gods but only worshiped Yahweh.
Every monotheistic religion is a branch or inspired by a monolatrist religion, monotheist or pholytheist. Every pholytheist religion was based on another religion, pholylatrist, pholytheist or ateist. And every pholylatrist religion is based on an atheist religion.
This is history.
So, and in fact, the origin of all religions came from atheist religions. They had no concept of such entities as "Gods", but still, they could worship: not Gods but other people, animals, the Sun, the Moon, the Rain, anything and everything that came out of Nature (and yes, humans are Nature creations, from this prespective).