before the last update I always got 4 pallets no matter what the payload was set to.
That's of course normal because, before the last update, the number of cart was unrealistically fixed, because we were swamped by users not understanding the "you must load the airplane first" concept, but then lots of users wanted the variable number back (it WAS variable, years ago), so we put it back, hoping the payload issue would be understood, but it seems is still a difficult concept to grasp.
When you say payload are you talking about the payload in the pmdg fmc under payload or is it from a p3d payload setting?
GSX can only read standard airplane variables so, the payload is read from these. GSX can't read anything else so, we can only assume that, when you load something in the PMDG FMC, it will be eventually matched in the standard payload variables.
Which might not happen *immediately*, because the airplane might simulate a progressive loading, so the variable might not be updated to the final value until this is completed. This was an issue which forced us to switch to the unrealistic fixed loading, for example.
However, now that we have Simbrief support, the issue of the airplane loading slowly is no longer an issue, because if you use Simbrief, the variable amount of carts will then based on the PLANNED payload, not the actual values when you call GSX, which might be or not updated, depending how the airplane handles them.