Change getStacks() to take a stack count parameter.