Query workitems for total count in AcdStarte

I was using a preview api, but seemed a bit unreliable at high volume. Any idea how to just get a count of workitems in a workbin in particular status?

disregard, figured out a way.