Measure out 2 cups of milk, putting aside 2 tablespoons in a small bowl. Combine the remaining milk, cream, and sugar in a medium saucepan. Heat over medium high heat, stirring to dissolve the sugar. Bring just to a boil, then remove from heat.
Grind the coffee beans coarsely. Add the ground beans to the milk mixture. Cover and let steep for 25 minutes.
Strain out the coffee grounds using a fine mesh sieve lined with a coffee filter. Return the milk mixture to the saucepan.
Put the cornstarch in a cup and whisk in the reserved 2 tablespoons of milk to create a slurry. Slowly whisk the slurry into the milk mixture. Return saucepan to the heat and bring to a boil. Boil for approximately 1 minute, stirring frequently, until the mixture begins to thicken. Remove from heat.
Combine the cream cheese and a pinch of salt in a large bowl and whisk until incorporated. Pour in the hot milk mixture. Whisk together until fully combined. Cover and chill in the refrigerator until completely cool. While the milk mixture is chilling, chop the espresso beans, then place them in the freezer to chill.
Once the milk mixture is completely chilled, pour it into an ice cream maker and process according to the manufacturer's instructions. Stir in the chopped espresso beans. Then transfer ice cream to an air-tight container and freeze for at least 2 hours before serving.