System and methods for estimating the number of packages in a measurement zone to gauge package flow. A linear array of distance-measuring sensors measures the height profile of a mass of packages conveyed past. The profile is differentiated, and steps in the differentiated profile are counted to detect package edges and to produce an estimate of the number of packages in the measurement zone. The estimate can be used to adjust the speed of the conveyor to provide a constant package flow.