Custom Stick how many buttons?

Never played SF IV or touched a PS3/PS4 controller, but my build I’m planning (mostly for Super Turbo versions on PC) would give me the option (HD remix is on PS3 and PCB would allow for PS3).

How many buttons do I need to play SF IV? Originally I was planning on 6 main buttons and a start and select to emulate SNES controls, but I’ve seen where fight sticks apparently can be hooked up to a PS3, and a $40 adapter could even do PS4.

I want to do it right the first time so the option to get into SF IV (and even SF V) is there, but I have no clue if I need things like L1, L2, L3, R3, and have no idea what things like Options, Share, PS button, and touch screen button are even used for in these games.

TLDR: wtf do all the buttons do, and do I need ALL of them for SF IV/ SF V?

Just get 8 buttons. It’s unlikely you’ll be legally bound to play SF for your whole life, and moving to other games that may be 8 buttons is a possibility, so you have a fallback.
I can’t speak for SF4, but SF5 allows for binds to other buttons, so personally, I have 3 punches, 3 kicks, a V-Skill and V-Trigger button - totalling 8. You can’t go wrong with more buttons.