How to pull value from widgets from RTC

I have a widget that show all defect work items and total count also.I want to pull that count(how many defect work item )and do some calculus on that count. how to pull count value from widget in RTC

RTC is based on this library, you should be able to get some ideas with it. And your calculations would be done in code on the device, not from the App Widget itself.