Too many!
In all seriousness, both SDCC & NYCC have so much stuff happening at any given time that you'll miss out on stuff pretty much whatever you do.
If you're only going there to buy comic books & related items, you can probably get away with spending just a couple of days at either show - if you're looking for the full pop-culture experience with panels, signings, screenings, giveaways, etc, you'll have to attend every single day *and* also have a plan in place for what you're wanting to do.