I've never tested this out myself, but here's a way that might work. If you want a limit of say, 3 items, and have 5 total in the game, you would post this in each item script:
IF $ITEMSTATE1 + $ITEMSTATE2 + $ITEMSTATE3 + $ITEMSTATE4 + $ITEMSTATE5 > 2 THEN $ITEMSTATE(whichever item it is) := 0.