refs #6 roughly implement shelfPlanRecount algorithem