Keeping track of item counts with js variables.