/**
 * Method to get the total number of items for the data set.
 *
 * @return  integer  The total number of items available in the data set.
 *
 * @since   1.6
 */
public function getTotal()
{
    // Get a storage key.
    $store = $this->getStoreId('getTotal');
    // Try to load the data from internal storage.
    if (isset($this->cache[$store])) {
        return $this->cache[$store];
    }
    try {
        // Load the total and add the total to the internal cache.
        $this->cache[$store] = (int) $this->_getListCount($this->_getListQuery());
    } catch (\RuntimeException $e) {
        $this->setError($e->getMessage());
        return false;
    }
    return $this->cache[$store];
}