I am using Microchip C dspic 3.11 (just released) and the latest FreeRTOS 5.0.3. on a dspic33fj256gp710.
In a uart input interrupt routing I bump a count for every read byte.
In a task I update (decrement) this like this:
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.