Can publications on research conducted before I started my tenure-track position count towards tenure? Do they need to have my new affiliation?
There is substantial variation between universities, and to an extent departments within a university, about what counts towards tenure. The best way to find out is to ask your department chair, a mentor, or someone on the tenure and promotions committee about what counts.

That said, there are ethics regarding what affiliations should be listed on publications. If your "pending publications" are in press or far along the review process, it would be unethical to switch your affiliation. If you are still writing the manuscript, or the reviews require a major revision, and you do additional work while at your new university, then it would be appropriate to add an additional affiliation.