This is actually controlled in the Outbound Tasks Configuration in POSDM for the WPUUMS Idoc.Where in you can find the Number of items.
Similarly you can control this in Aggregated Sales Control (POS interface under SD Node) and assign the same no of items if you want to have a new document(billing) if the number of items are more than
500 or 1000 etc.
Hope this helps.