I have 3 weapons in a crate, two with bipods, one without.
If I do getWeaponCargo I get [["arifle_MX_SW_pointer_F"],[3]]
If I do weaponsItemsCargo I get
[ ["arifle_MX_SW_pointer_F","","","",[],[],"bipod_01_F_snd"], ["arifle_MX_SW_pointer_F","","","",[],[],""] ]
There is no way to determine the count of weapons while still being distinct on attachments.
This could be fixed with an alternative syntax for weaponsItemsCargo, for example:
weaponItemsCargo [container, includeCounts], includeCounts is false by default for backwards compatibility, but when set to true it would return
[ [["arifle_MX_SW_pointer_F","","","",[],[],"bipod_01_F_snd"], 2], [["arifle_MX_SW_pointer_F","","","",[],[],""], 1] ]