Thanks to an Amazon book review which listed the stories, but no descriptions
The short story is called:
"The Thirty-Nine Buttons" by Margeret Weis.
From the First book in the The Fleet Anthology series:
"The Fleet" edited by David Drake and Bill Fawcett.
Found and e-book version.
He saw a dress made of some silky black material, poured like shining oil over a body of surpassing beauty. And down the front of that dress, beginning just where a man—any normal, healthy, human male—might like to begin, was a row of buttons—shining, glittering diamond buttons.
Roberts didn’t count them; at that moment he couldn’t have counted his fingers. But he knew that there were thirty-nine.
“How many buttons are there on the full dress uniform of a naval officer, cadet?” Jeremy snapped, her voice the voice of Roberts’ instructor, way back in the days of basic training.
He does not end up crying, but he is certainly not happy at the end.