They were counting the number of townhouse units from the end, where Patricia Brooks lived. Then they see a gate that is open, and that raises suspicion that must be the house,
It raises the suspicion that the cops are incompetent idiots. The gate is open, this must be the right place. Lets storm the yard and point guns at everyone.
The guy is VERY lucky to be alive. He shot at cop and then left the house holding a gun. Thats usually a death sentence.
The Commonwealth's attorney sounds like an idiot as well.