How many times did kansas state beat the Texas longhorns while colt mccoy was the quarterback for Texas?

Twice.

KState and Texas met twice while McCoy was the Longhorns' starting QB. In 2006 the Wildcats won, 45-42, in Manhattan and in 2007 the Wildcats won, 41-21, in Austin.