add getCount for pie chat.