If you're using std::list, then yes there's a .size() function.