Both forms are admissible, although the second one is preferred, I think; actually, the natural position for numerals in the Japanese sentence is just before the verb, after all other complements. For example:
Kodomoga san-nin arimasu.
(He/she) has three children.
Kyonen kaishaha kurumawo godai kaimashita.
Last year, the company bought five cars.
So the が is variable -- with います/あります, you'd use が, but with other verbs, you would use the particle appropriate to the last verbal complement, whichever it is. If, for whatever reason, the numeral cannot be near the verb, typically because there is more than one set of numerals in the same clause, it can go near the object it modifies separated by a の, like in the first form.