slut shaming

My boyfriend and I have been together for 7 months the 10th. He has suddenly been getting upset by the amount of guys I slept with in the past. I've only been with one more person than he has but he has been treating me like I'm a slut because of it. How am I supposed to react towards the situation? What makes it okay for him to act this way?