There are merits for most of the above replies, however, the OP did state that an encoder is on the cards.
Let's look at it in a bit more detail, although little information has been given so this is my take on it.
Using a standard timer:
Great, may work reasonably well, however, timers have a drawback (assuming standard pulse or delay off/on), if the belt stops the timer will either continue to time out or re-start (depending on the logic & timer type) so gap may not be consistent, are a little un-reliable regarding accurate timing, if the VFD speed is changed would have to be re-calibrated.
Using a counter or incrementing a variable based on a time interrupt or other:
Will work reasonably well, Can stop the count on belt stop but even a small delay i.e. ramp of VFD will cause errors, again speed ramp down or change of speed will have to be re-calibrated.
Encoder, simple star wheel & prox or actual encoder:
Consistent regardless of stops, ramps etc. generally more accurate as the pulses are consistent with movement of belt.
Finally, another possible problem is if the boxes bunch up on the infeed conveyor this may be due to operator loading too quickly or a box snagging on conveyor sides so the next box then bunches up releasing the two together, so there may not be a gap seen by the PE, simple solution is to ensure the metering belt runs at a slightly faster speed to separate the boxes.
So in my opinion, For accurate metering the latter two is the best option on what information supplied.