As you live in California, you'll need to file the IT-2014 form for New York, and you will be considered a part-year resident for the time you spend there. Typically you'll want to claim the same number of allowances on your State (NY) form as you would with your Federal W4.
When it comes time to file your taxes the following spring, you will be required to pay income tax to the state of California as a resident (assuming you've lived there for over 6 months out of the year, although that can be complicated), however you will be able to claim a credit for the tax you already paid through paycheck withholding to the state of NY. So in essence, you will be paying income tax to both states, but you will not be double charged.
Hope this helps.