If you have an instant-read thermometer, you can get fancy. Cooked corn should be around 150°F to 165°F (65°C to 74°C) in the center.
But honestly, most of us don’t carry a thermometer to a backyard barbecue. So stick with the color and the pop. Your instincts are better than you think.
Remember: corn continues to cook even after you pull it out of the water. It’s called residual heat. So if you’re on the fence, pull it out a second early. Better al dente than a mushy mess.