The difference is not so much caused by the word order or the time (past) as by the meaning of "once".
In the 1st sentence "onces" means "some time ago" = однажды (ранее)
In the 2nd sentence it means NUMBER (how many times), that's why the word order is the result of the meaning of "once".