How do I know if a pill given to me by a pharmacist is actually what I was prescribed?

Ask another pharmaci. There are computer programs for identification of pills in the internet or any pharmacy. Some physicians may have similar programs.