>Some things you buy in a month might last into the next month. That will introduce some variation but over longer periods it should cancel out.
Alternately: you can note the day you first and last ate from the container.
Or what I used to do: make tally marks on the container to figure out how many portions it typically provides; then, going forward, count a "standard" portion of that food accordingly.