The optimal number is, basically enough so that you feel comfortable that you will match to a program that you like. "Average number of interviews per applicant" is a number that often gets bandied about, and I think 12 is about high-normal, but that number should be flatly uninteresting to you -- what you are interested in is the number of interviews you should attend. That number is highly applicant-specific, and any suggested estimate put forth by a SDN'er in the absence of more detailed data about your specific application should be regarded as suspect. You would probably do better to ask your student dean (the one who writes your Dean's Letter) and your home psych program director -- or any of your attendings if they have gone through residency training fairly recently -- about how many programs you should apply to. If your student dean is organized, s/he should at the very least be able to provide you with some relevant statistics (eg., # interviews attended for past 5 years of students who matched vs. didn't match, match vs. didn't match according to USMLE Step 1 score, etc).
-AT.