There's no real need for this definition, you can just use data.size() below.