I'm not sure if your asking how many total buttons there are in the jar or how many there were after she put 40 in so i'll answer both.
Total amount in groups of ten: 17 groups
Total amount Robin put in in groups of ten: 4 groups
I hope that makes sense.