You don't need to keep a separate count. @portfolios.length works