Can we get how many window when running testcase

Is there any way to calculate how many window in when running testcase ?
i need to do decision step , here is the flow
if window handles more than 0 {
} else if window handles == 1 {

anyone know the solution pls answer my question :slight_smile: thank you