Ok. If you batchsize is 1 than you just have to check for your label:
for images, labels in test_loader:
    images = images.to(device)
    labels = labels.to(device)
    outputs = model(images)
    _, predicted = torch.max(outputs.data, 1)
    if(torch.equal(predicted, labels)):
        if labels.item() == 5:
            num_dog_label += 1
            if predicted.item() == 5:
                num_correct_dog += 1

I took 5 because that is the number that represents dog in the cifar10 dataset.
cifar10 classes are ordered like this:
classes = ('plane', 'car', 'bird', 'cat',
           'deer', 'dog', 'frog', 'horse', 'ship', 'truck')

But since you said you only have 2 classes it might be either 0 or 1. Try printing your labels tensor and check for yourself.
Just in case you do want to use higher batchsize. Try something like:
for i, label in enumerate(labels):
    if label == 5:
        num_dog_label += 1
        if predicted[i] == 5:
            num_correct_dog += 1

accuracy = 100*num_correct_dog/num_dog_label

print(f"number of dog labels: {num_dog_label}")
print(f"number of correctly detected dog labels: {num_correct_dog}")
print(f"dog classification accuracy: {accuracy:.2f}%")