First thing, you can buy them in singles or pairs. All clowns are born male, but change to female over time. If you buy a single clownfish no matter what you do it will be a female eventually.
If buying in pairs you are usually either buying a known mating pair (very costly) or buying two very small clowns to have grow together and become a mated pair. Be aware that initially there
will be a power struggle between them. Eventually one will become the submissive, this will be the male and will be denoted by it listing to it's side and wiggling when the other clown makes an agressive move towards it. The other will become the dominant and this will be your female as they grow.
So essentially you will not have a choice over the sex of the fish. When you buy them as little 3/4" babies they are typically male but one will become a female if you buy them as a single or in a pair. You also will not want to keep more than 2 clowns in most situations in an aquarium. Never mix differing species of clowns either, it's an expensive disaster you will set yourself up for.
Other things to look for while buying fish. Be sure you get a very very good look at the fish you want to buy. Look all over it's body for the following typical signs of disease or parasites. If there is little white dots all over the fish it likely has marine
ICH, avoid buying it if you don't want to be immediately dealing with an ich problem that can take the life of the fish you just spent $35 on.
Look at the fish for small brown spots or small white looking things with 2 large eyes. This fish likely has parasites and you should avoid buying it as most parasites can eventually claim a fishes life.
If the fish has what looks like a white or red velvet covering it you definetely don't want to buy that fish or any others in the tank. Velvet is a very fast acting fish disease, that fish likely won't last more than 3 days if not properly treated.
Watch any prospective fish for certain behaviors that could mean it has disease or parasites. Look for what is called "flashing", this means the fish is seen rubbing up against rocks and the sand and looks like it is deliberetly trying to get rid of something on it's body. This is your first and easiest to read sign of a disease or parasite. Other signs are general listlessness or lack of activity, be sure you have read up on the fishes typical behaviors as lack of activity is completely different for a clown than a watchman goby (watchman gobies are rather inactive to begin with).