If the bar is still on your back, unracked, it's generally considered all one set. But as for how long of a pause is beneficial and how long is just wasting energy standing there, I don't know that there's an exact set time. Obviously you need enough time to exhale, re-inhale, and brace your trunk. That's a couple seconds at the very least. In a hard set, most people need more time than that, and often more than one breath between reps.
I think the answer to your question is that it's individual and depends on the person. We can easily find parameters that are clearly too long (five minutes) or too short (half a second), but there's some wiggle room in there for reasonable individual variety. I think most people will find 3-8 seconds between reps in a heavy set of 5 to be within the norm, but that's not a hard rule.