I'm going to ask my roommate not to invite her boyfriend over so much
Is there something about her boyfriend or their relationship that bothers you?
Yeah and its her first boyfriend too.
That's unfortunate. Since the two of you share the apartment you should have a conversation with her and set up guidelines for when her boyfriend visits. Tell her how you feel and that you want your space to be respected.
No, I'm just going to tell her what I expect from her and that she has to follow the rules I set.
Since you share the apartment, you have to share in how you set up the rules for guests. It not fair to her if you dictate the rules she has to follow. Try to compromise with her and come up with a plan you can both be happy with.