JS calculates size of static pantry

Can change the number of items in the static pantry without introducing
bugs on JS side.