The doctor should have told you what he expected you to take! If not look on the bottle from the pharmacy! It most likely says take 1 three times daily or something of the sort!
xanax is a short acting benzodiazapine. it comes on strong and wears off fast and works great for panic attacks. i think it works most effectively, when used "as needed." But i'm not a doctor, and june is right, you should always consult an m.d. or pharmacist if you have questions about your meds. good luck