re-added the count limiter to the script state serializer