There is no mechanism for a statewide recount. Instead, John Perez (or any voter actually) has to request a recount in any county he wants recounted. He can also choose the precincts he wants recounted. So Perez would likely start with Imperial County, where he beat Betty Yee by a remarkable 31%. Unfortunately for him, Imperial is probably too small to entirely make up a deficit. He'd probably also need to select precincts in some Southern California counties that he beat her by 10% or more.
Since Perez is from LA county you might think he'd look there first. He beat her in LA County by only 4.8%, however. When it's that small, there's no guarantee he'd pick up votes in the county as a whole. It's less than the 8.0% he beat her in San Bernardino or 9.7% in Kern. He'll likely have to drill down and find LA county precincts that he beat her by 10%+. I don't have precinct data, so i can only assume such precincts exist. If there's enough of them in LA County, then he should go there first. One problem he has is that he comes from a low turnout assembly district. There were only 17k assembly votes in the district in the primary. There were 37k in the San Bernardino county AD-40, for example. So there aren't likely that many votes in his own district.