The commentary of Haamek Davar to the first few verses of Ki Sisa (Exodus 30:11–16) explains that they refer to two different obligatory donations. Each was half a shekel per person, and each served its own purpose. Besides those purposes, the monies donated were used also to count the people: see how many half-shekels were donated, and you know how many people donated them.
One of the donations, he says, was half a shekel per person aged twenty years and up (as verse 14 says explicitly). The other, he says, is subject to a dispute in tractate Sh'kalim, but he goes along with the majority view there that it was for "all who had passed through the sea" back in Exodus chapter 14.
But then he says something curious (in his commentary to verse 14):
ומעתה אם ירצו למנות גם מבן חודש יכולים למנות בשעת מתן לתרומת הלשכה ואם ירצו למנות רק את בן עשרים שנה יכולים למנות בשעת מתן לאדנים
That is, if they wanted to count even from the age of one month, they could count the people using the one donation; of they wanted to count only from the age of twenty years, they could count using the other donation.
One month? Someone one month old hadn't been through the sea! The passage through the sea had been more than a month prior. How can he say "למנות גם מבן חודש / to count even from the age of one month"?
 "דיש באותה שעה שתי נתינות / there were at that time two givings", commentary to verse 12