The meaning of the idiom to keep track of is to document, record or notice movement, position, behavior or a combination of those traits. A track is at the most basic level a foot print, so the origin of the expression is from an essential human and animal activity-hunting.
Example 1: She has to keep track of her toddler at all times, because he can run away very quickly and get lost.
Example 2: If we can keep track of our expenses, we can reduce them and have more money to pay for food, shelter, and other necessities.
Example 3: Keep track of how many meals are served tonight, so we know how much food to prepare tomorrow.
Example 4: I have such a huge collection of Barbie dolls that I can't keep track of them all - I may have to dedicate a room to them.