add count end-point to tasks api