I'm not German, but if I recall correctly:
- "Eins" is for the actual number "one"
- "Ein" is "a" for masculine/neuter genders
- "Ein" is also used for expressing the amount, e.g. "ein Auto, zwei Autos"
That said, high school was a long time ago, so I might be way off :)