You are making progress ! Do use break-points and single-step (F11) through the code, observing exactly what happens.
Look how both total and count are updated
only if there's a valid entry > 0/
double total = 0.0d;
double count = 0.0d;
double[] arr1 = new double[20];
for (int i = 0; i < 20; i++)
{
Console.Write("Enter a number: ");
string input = Console.ReadLine();
if (input == "0") break;
double parsedvalue = 0.0d;
if (int.TryParse(input, out parsedvalue) && parsedvalue >= 0.0d)
{
arr1[i] = int.Parse(input);
total += parsedvalue;
count++
}
}
double average = total / count;
Console.WriteLine($"Average of all positive numbers: {average}");
Console.ReadKey();