If you have 1 cup that is 8 oz of coffee then you have 180 mg of caffeine.
So since a typical sized coffee mug is 8 oz in size that one cup of coffee would have 180 mg of caffeine in it and when you drink 2 of those cups of coffee you get 360 mg of caffeine.
So if you want to make sure you have caffeine leave your system before bed avoid drinking the coffee at least 2 to 4 hours before bed.
Caffeine can keep some people awake and prevent them from getting enough sleep which it does happen to me sometimes.
I have to have at least a cup of coffee in the morning otherwise I don't feel alert and awake even though I get enough sleep most nights.