add open cert count for user and team and update pending cert query