A quick solution could be something like
this for wiffle balls with a weight counter scale (like they do in industry for mass amounts of products).
Think of it as a zamboni for FRC, though with all of the drive teams removing robots after every match that may get difficult.
But I do think the best way to go about counting the balls will be using a counting scale, like
this.