public int CountLinksForUser(long userId) { if (!UserDao.Exists(userId)) { throw new InstanceNotFoundException <UserProfileDetails>("userId", userId); } return(LinkDao.CountForUser(userId)); }