function [n] = elems(a)
sz = size(a);
n = prod(sz);