count in and out degrees