Have you heard of "reverse sneezing"? It's pretty common in yorkies, esp. puppies (they'll sometimes outgrow it, for the most part). It's sort of rhythmic, in-out, sometimes has a sort of "dry-sucking-sound". So, does it sound like that? If you genuinely think it's a cough, you may want to get checked for kennel cough.
You didn't recently get him a vaccine for kennel cough, did you? If yes, that could have actually given him kennel cough. Hope he feels better soon!