get the actually number of DOM elements closes #510