I don't have any sleep issues as long as I stick to a simple rule: No caffeine after 15:00.
Most days, I drink 5 to 7 expressos, though there are days I don't drink any coffee, e.g. when not at home. I often drink one (sometimes two) expressos in the hour before going to bed. I'm almost always asleep in a couple of minutes after switching off the lights.