Problem with onChange function and millis delays in switch

The condition in this if statement will always evaluate as true. The reason is that you used the assignment operator (=) instead of the comparison operator (==). This has the side effect of setting the value of Count to 5, which is surely not what was intended, but happens to not cause a problem in this program because you later set it to 0 as intended:

Beyond the inappropriate operator, the value in the condition is also wrong. This default case can never be reached when Count has a value of 5 because you have an explicit case for that value:

Even though you could "fix" it by changing the condition to Count == 6, I would suggest instead to use an explicit case for that value and removing the conditional entirely:

                case 6:

In a state machine type of use case as you have here, the default case would typically only ever be used if the programmer wanted to add a safety mechanism to handle a condition that should never occur if the program is working as intended. You could do something like this:

                default:
                  Serial.print("Error: Unexpected value of Count: ");
                  Serial.println(Count);