Vision counting and packaging machine