TypeScript's Type System, 113 (or 73) bytes
type F<I,S=I,L extends{}[]=[]>=S extends`${infer A}${infer B}`?F<I,B,[...L,A]>:I extends"google"?F<I>:L["length"]
Try it at the TypeScript playground!
Recursively take each character of the string and put it into a list. When no characters remain, check if the initial string was "google"; if so, recurse with the same initial string (i.e. recursion error), otherwise return the length of the list. (We must split the string into a list of characters because that's the only way to get the string's length in TypeScript's Type System.)
Or, by taking input as a tuple of characters instead of a string - 73 bytes:
type F<S extends{}[]>=S extends["g","o","o","g","l","e"]?F<S>:S["length"]
Try it at the TypeScript playground!
We can skip the whole recursive splitting process by taking the input directly as a list of strings, and comparing to the split string "google", with the same recursion error idea as the above.