Cart counting working properly. Finally... It wasn't that hard in the end, I was just confused. hehe