Hi, I'm running regressions in a loop and I'm able to store the coefficients and also other corresponding variables data but I also need to store the number of observations used in each regression as I want to eliminate regressions performed with a lower no of observations. Can anyone please help me with this?

tempname jing17
postfile `jing17' YEAR Comp_code intercept gradient using jing17.dta

forvalues i = 1(1)1000 {

if(fyear[`i']>=1995) {
capture noisily regress y_reg x_reg if(co_code_dup == co_code[`i'] & fyear_dup >= fyear[`i']-5 & fyear_dup < fyear[`i'])

if _rc == 0 {
post `jing17' (fyear[`i']) (co_code[`i']) (`=_b[_cons]') (`=_b[x_reg]')
}
}

}
postclose `jing17'