Work in NJ remotely & company in NY

My company headquarters is in NYC but I work remotely in NJ. I do go in for some meetings 4-5 days a month. Do I still need to pay NY state tax? If so, what is the max I can work out of the NY office/year?