Cache total results number into correct variable name

When totalVar was set, number of total results was still cached under default name ('total').

This fix cache total results number under correct variable name (which is get from totalVar property).