Grabbing imageCount from js, posting it and saving it in the DB