Small troop increases for such purposes are not something Pakistan opposes. What Pakistan would have issue with is a significant increase in US troops for the purpose of escalating military actions against the Afghan Taliban, or any kind of significant increase that would push the Afghan Taliban away from peace talks.
These are two diametrically opposite view points as I quote here and, as often, truth somewhere lies in between. Closer to which side?? I am more in agreement with @masterchief_mirzaNope. Pakistan doesn't really want American troops in Afghanistan. It's possible that on occasion, such statements may have been made by the foreign office to (a) gauge the response and (b) cleverly project a degree of sympathy for the official position of Ghani and his government. It is "posturing" effectively and we are aware that in post-USA Afghanistan we will need to work with the Taliban AND Ghani.
My **hunch** is that Pakistan doesn't want ANY American troops in Afghanistan. The days of Al-Qaida or other terrorists groups in Afghanistan are over. Every segment of the Afghan society is aware of the catastrophe brought upon their country because of those Arab fighters. And, given America's close embrace of India, even 2500 American troops are a potent resource for India!
Also I don't think Americans think that they can get more concessions out of the Talibans. The Talibans are gunning for absolute power and they sense victory. Americans killing a few thousand more of them won't stop them now after 19 years of sacrifices.
But, yes, the Pakistani FM statement was just another diplomatic 'why can't we all get along' types...