This is defined in Pathfinder's Glossary:
An encounter is a short scene in which the PCs are actively doing something. Examples of encounters include a combat with a monster, a social interaction significant to the adventure’s plot, an attempt to disarm a trap, or the discovery of a mystery or clue requiring further investigation.
Emphasis mine. An encounter is a scene. It is something that we focus on as part of the role-playing experience.
"Walking down the street" is an encounter if it is an event relative to the narrative. Usually it isn't. If something so interesting happens when walking down the street that we spend metaphorical "screen time" on it, it's an encounter.
Further, Pathfinder uses, but does not as far as I can tell define, the terms "combat encounter" and "roleplaying encounter". Obviously these inherit the ambiguity.
The definitions are, I believe, left this vague for the benefit of GMs. Certainly, this is how it has been handled at every table I've been at - a combat encounter begins whenever the GM tells us to roll for initiative. It ends when the action has died down to the point we no longer care precisely in what order things are happening. If we later need to determine whether we're in a new encounter but aren't sure, we again ask the DM and he or she just decides.
In the end, don't worry about not having the precise game-logic definition of an encounter nailed down. One doesn't exist, and probably isn't intended to.